php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46586 Lower case method name casting for static __call(), not for dynamic
Submitted: 2008-11-17 01:20 UTC Modified: 2008-11-17 09:42 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: zerspam at mail dot ru Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.2.6 OS:
Private report: No CVE-ID: None
 [2008-11-17 01:20 UTC] zerspam at mail dot ru
Description:
------------
I think the method name shouldn't cast to lower case if static calling used.

Reproduce code:
---------------
class a
{
    function __call($name, $p)
    {
        echo $name . ' ';
    }

    function foo()
    {
        $this->BaR();
        self::BaR();
    }
}

$a = new a();
$a->BaZ();
$a->foo();

Expected result:
----------------
BaZ BaR BaR 

Actual result:
--------------
BaZ BaR bar 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-17 09:42 UTC] jani@php.net
Fixed in PHP_5_3 branch, won't fix in PHP_5_2.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 07 12:01:35 2025 UTC