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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Mon May 06 19:01:32 2024 UTC