|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45089 __callStatic $name case sensitivity
Submitted: 2008-05-26 00:41 UTC Modified: 2008-06-03 19:01 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: danielc at analysisandsolutions dot com Assigned: pollita (profile)
Status: Closed Package: Class/Object related
PHP Version: 5.3CVS-2008-05-26 (snap) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
34 - 4 = ?
Subscribe to this entry?

 [2008-05-26 00:41 UTC] danielc at analysisandsolutions dot com
The value of $name produced by __callStatic() is lower cased but the $name produced by the regular __call() is unchanged.

Please adjust __callStatic() so it doesn't change the case of $name.

Reproduce code:
class MethodTest {
    public static function __callStatic($name, $arguments) {
        echo "Calling static method '$name' "
             . implode(', ', $arguments). "\n";

MethodTest::runTest('in static context');

Expected result:
Calling static method 'runTest' in static context

Actual result:
Calling static method 'runtest' in static context


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-26 19:23 UTC]
Here's a patch:

Solve the callback issue too.

I also added two tests in:

 [2008-06-03 19:01 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Fixed in 5_3 and HEAD.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 17:01:32 2024 UTC