|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-29 08:07 UTC] helly@php.net
[2007-03-16 08:40 UTC] ecentinela at gmail dot com
[2007-07-29 22:45 UTC] tom at ix dot tc
[2007-08-23 01:47 UTC] stas@php.net
[2007-11-05 14:57 UTC] lokrain at gmail dot com
[2007-11-09 23:37 UTC] stas@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 01:00:01 2025 UTC |
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