|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56822 Runkit does not rename method correctly
Submitted: 2006-02-05 22:56 UTC Modified: 2013-02-23 22:43 UTC
From: daniel dot oconnor at gmail dot com Assigned: pollita (profile)
Status: Closed Package: runkit (PECL)
PHP Version: 5.0.5 OS: win32
Private report: No CVE-ID: None
 [2006-02-05 22:56 UTC] daniel dot oconnor at gmail dot com
Either I missed something obvious or it's not quite working right.

I attempt to rename a method; the functions tell me I have succeeded; but then PHP dies when trying to call that method.

PECL 5.0.5

Reproduce code:
class A {
	protected $str = "My String!";

	public function getString() {
		return $this->str;

$result = runkit_method_rename('A','getString','CUSTOM_getString');
$result = runkit_method_add('A','getString', '', 'return self::CUSTOM_getString();',RUNKIT_ACC_PUBLIC);

$a = new A();
print $a->getString();

Expected result:
bool(true) bool(true) My String!

Actual result:
bool(true) bool(true)
Fatal error: Call to undefined method A::getString() in C:\vx\tests\runkit.php on line 17


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-21 20:21 UTC] pear dot neufeind at speedpartner dot de
related to #6019; mixed-case doesn't work
 [2009-07-21 20:44 UTC] pear dot neufeind at speedpartner dot de
Re-tested against fix mentioned in #6019, which fixes this issue here as well.
 [2013-02-23 22:43 UTC]
-Status: Verified +Status: Closed -Assigned To: +Assigned To: pollita
 [2013-02-23 22:43 UTC]
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

 For Windows:
Thank you for the report, and for helping us make PHP better.

This got fixed today, it was related to bad case-folding (a lowercase method name 
would have worked)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 03:01:33 2024 UTC