From:             bsgreenb at gmail dot com
Operating system: Windows XP
PHP version:      5.3CVS-2008-04-04 (CVS)
PHP Bug Type:     Class/Object related
Bug description:  Trouble with scope resolution operator being used twice

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

-- 
Edit bug report at http://bugs.php.net/?id=44642&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44642&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44642&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44642&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44642&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44642&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44642&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44642&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44642&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44642&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44642&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44642&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44642&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44642&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44642&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44642&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44642&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44642&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44642&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44642&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44642&r=mysqlcfg

Reply via email to