ID: 26739 Updated by: [EMAIL PROTECTED] Reported By: demiurg at terra dot es Status: Open Bug Type: Feature/Change Request Operating System: * PHP Version: 5.0.0 New Comment:
Actually AFAIK it's implemented in PHP 6 HEAD and maybe will be also backported to 5.3. Previous Comments: ------------------------------------------------------------------------ [2007-07-29 22:45:56] tom at ix dot tc The last response was 3 years ago but this has yet to be implemented. Any updates on this? I would really like to have this feature. ------------------------------------------------------------------------ [2007-03-16 08:40:01] ecentinela at gmail dot com Have been resolved this issue? There is some workaround? Thanks ------------------------------------------------------------------------ [2003-12-29 08:07:21] [EMAIL PROTECTED] __call() doesn't offer anything to distinguish between static and dynamic calls. So we'd need a new magic function say __static_call(). For 5.0.0 we have a feature freeze already, so this might take a while. ------------------------------------------------------------------------ [2003-12-29 07:50:16] demiurg at terra dot es Description: ------------ Hello, I'm not sure whether it is a bug or a feature, so I just point this out and you decide. __class() method works like OK for objects, but completely fails when calling a class method (see Reproduce Code). P.S. Before sending this report, I did a search on "__call" and have found 11 bugs, none of which describes the issue. Thanks! Reproduce code: --------------- <?php class a { static function __call($method, $params) { echo "Called $method(".implode(', ', $params).")\n"; } } $c = new a; $c->test(1, 2, 3); a::test(3, 2, 1); ?> Expected result: ---------------- Called test(1, 2, 3) Called test(3, 2, 1) Actual result: -------------- Called test(1, 2, 3) Fatal error: Call to undefined method a::test() in a.php on line 12 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26739&edit=1