php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43047 Method name passed to __callStatic is always converted lowercase
Submitted: 2007-10-19 22:46 UTC Modified: 2007-10-20 15:53 UTC
From: lars at strojny dot net Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.3CVS-2007-10-19 (snap) OS: Gentoo Linux
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lars at strojny dot net
New email:
PHP Version: OS:

 

 [2007-10-19 22:46 UTC] lars at strojny dot net
Description:
------------
The first argument passed to __callStatic() - the method name - is always converted lowercase. In case of __call() the method name is supplied as-is.

Reproduce code:
---------------
<?php
class MyInstance
{
    public function __call($method, $params)
    {
        echo $method . "\n";
    }
}

class MyStatic
{
    public static function __callStatic($method, $params)
    {
        echo $method . "\n";
    }
}

$instance = new MyInstance();
$instance->fooBar(); // fooBar
MyStatic::fooBar();  // foobar


Expected result:
----------------
fooBar
fooBar

Actual result:
--------------
fooBar
foobar

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-20 15:53 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

For static calls the original name isn't kept. Changing that would require bigger changes to the engine.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 23:01:33 2025 UTC