|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-12-28 10:35 UTC] sebastian@php.net
Description:
------------
Static members of a class should be accessible even if the classname is stored in a variable.
Reproduce code:
---------------
<?php
class Foo {
public static function bar() {
print 'Foo::bar()';
}
}
$class = 'Foo';
$class::bar();
?>
Expected result:
----------------
Foo::bar()
Actual result:
--------------
Parse error: parse error in D:\foo.php on line 9
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
This still does'nt work and I would realy like to see this working because it is very ugly to use eval("return $className::method();") as a workaround...