From:             kopelke at gmail dot com
Operating system: Ubuntu 9.10
PHP version:      5.3.1
PHP Bug Type:     Strings related
Bug description:  complex string parsing does not parse static classes

Description:
------------
The complex string syntax will not include static classes. I cannot use
them as output.

Quote from doc: In fact, any value in the namespace can be included in a
string with this syntax. Simply write the expression the same way as it
would appear outside the string, and then wrap it in { and }. 

I do expect this to be wrong. The documentation states "any value" and
A::$a is a valid value for a string.


Reproduce code:
---------------
class A {
  static public $a = 'A';
}

echo "{A::$a}";

Expected result:
----------------
A

Actual result:
--------------
{A::}

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

Reply via email to