php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57250 The name of the method to add must be lower
Submitted: 2006-09-20 10:05 UTC Modified: 2006-09-20 12:07 UTC
From: linanhui at hotmail dot com Assigned:
Status: Not a bug Package: runkit (PECL)
PHP Version: 5.1.6 OS: centos 4.2
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: linanhui at hotmail dot com
New email:
PHP Version: OS:

 

 [2006-09-20 10:05 UTC] linanhui at hotmail dot com
Description:
------------
runkit_method_add()
The name of the method to add must be lower

Reproduce code:
---------------
<?php
class Example {
   public function fooBar() {
       echo "foo";
   }
}

runkit_method_add('Example','fooBar3','','echo "bar";');
$object=new Example();
$object->fooBar3();
?> 


Expected result:
----------------
Fatal error: Call to undefined method Example::fooBar3() in /var/www/html/test.php on line 57

Actual result:
--------------
echo "bar"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-20 12:07 UTC] pollita@php.net
Actually, no, the name of the method to add does not need to be lowercase.  That's why you're seeing the expected results:  add a method, get a method.  Yay! Profit!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 22:01:28 2024 UTC