| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2008-04-05 12:29 UTC] colder@php.net
  [2008-04-05 17:59 UTC] bsgreenb at gmail dot com
  [2008-04-05 18:01 UTC] bsgreenb at gmail dot com
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 11:00:01 2025 UTC | 
Description: ------------ The problem is that a::$b::d() causes error, where a is a class with static variable $b, which points to a seperate class c, which has the static function d. I know other people have encountered this problem. One person told me the only way they knew to deal with this was call_user_func() this seems like something that would be very important to fix. it is for me, at least. Reproduce code: --------------- <?php //Tested on PHP 5.3, Class a { public static $b ='c'; } Class c { public static function d() { return 'this works'; } } a::$b; // 'c' c::d(); // 'this works' a::$b::d(); /* this crashes with the following error: Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\testobj.php on line 17 */ ?> Expected result: ---------------- I expected that a::$b::d() would return 'this works', as opposed to throwing an error at me. Actual result: -------------- Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\testobj.php on line 17