php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58057 Add support for explicitly adding/redefining static methods.
Submitted: 2008-02-24 16:21 UTC Modified: 2013-02-23 11:21 UTC
From: mjlivelyjr at gmail dot com Assigned: pollita (profile)
Status: Closed Package: runkit (PECL)
PHP Version: 5.2.1 OS: gOs
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mjlivelyjr at gmail dot com
New email:
PHP Version: OS:

 

 [2008-02-24 16:21 UTC] mjlivelyjr at gmail dot com
Description:
------------
Currently you cannot explicitly specify that a new or redefined method should be a static method.

While you can still call any of the functions statically, you will get strict errors. This patch will allow runkit created static functions to not produce STRICT errors.

Reproduce code:
---------------
Patch: http://c01.ds-o.com/svn/patches/php/runkit/static.methods.patch

<?php

runkit_method_add('FooClass', 'testMethod', '', 'echo "bar";', RUNKIT_ACC_PUBLIC | RUNKT_ACC_STATIC);

?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-23 11:21 UTC] pollita@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2013-02-23 11:21 UTC] pollita@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pollita
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 15:01:28 2024 UTC