#43047 [Opn->Bgs]: Method name passed to __callStatic is always converted lowercase

From: Date: Sat, 20 Oct 2007 15:53:01 +0000
Subject: #43047 [Opn->Bgs]: Method name passed to __callStatic is always converted lowercase
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-118765@lists.php.net to get a copy of this message
 ID:               43047
 Updated by:       johannes@php.net
 Reported By:      lars at strojny dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: Gentoo Linux
 PHP Version:      5.3CVS-2007-10-19 (snap)
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[2007-10-19 22:46:08] 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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43047&edit=1


Thread (2 messages)

« previous php.bugs (#118765) next »