php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57508 Manipulate static methods
Submitted: 2007-02-03 22:05 UTC Modified: 2013-02-23 14:22 UTC
From: mirek at ringley dot co dot uk Assigned: pollita (profile)
Status: Closed Package: runkit (PECL)
PHP Version: 5.2.0 OS:
Private report: No CVE-ID: None
 [2007-02-03 22:05 UTC] mirek at ringley dot co dot uk
Description:
------------
runkit_static_method_add(...)
runkit_static_method_copy(...)
runkit_static_method_redefine(...)
runkit_static_method_remove(...)
runkit_static_method_rename(...)


Reproduce code:
---------------
class C {}
runkit_method_add('C', 'foo', '', 'echo 1;');
C::foo();


Actual result:
--------------
Strict Standards: Non-static method C::foo() should not be called statically

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-03 22:08 UTC] mirek at ringley dot co dot uk
runkit_static_method_* functions should be added to allow adding/removing... static methods.
 [2013-02-23 14:22 UTC] pollita@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pollita
 [2013-02-23 14:22 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.

Recent fixes for 5.4 included the definition of RUNKIT_ACC_STATIC and 
RUNKIT_ACC_ALLOW_STATIC which can be passed for the flags parameter (even in pre-
5.4 versions).
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue May 11 14:01:34 2021 UTC