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
 [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

Pull Requests

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: Mon Dec 09 19:01:27 2024 UTC