Re: Re: PHP 5.1 (Or How to break tousands of apps out there)
| From: | Rasmus Lerdorf | Date: | Fri, 25 Nov 2005 21:57:31 +0000 |
| Subject: | Re: Re: PHP 5.1 (Or How to break tousands of apps out there) | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20451@lists.php.net to get a copy of this message | ||
Jessie Hernandez wrote:
Hello Rasmus, Rasmus Lerdorf wrote:Are you saying this works? namespace ns { function foo() { } } function foo() {} echo true ? ns:foo():foo(); Looks very confusing to me. -RasmusJessie Hernandez wrote:Not in my patch! I just tested the example below with my patch, and it works *PERFECTLY*: <?php namespace ns {Why is "\" the only available character? Right now my patch is using ":" and it's working great (though against 5.1). Is ":" used in some other way in PHP 6?It clashes with the : in the ternary. -Rasmusclass test1 { public static function getMessage() { return 'ternary test (left side)!'; } }class test2 { public static function getMessage() { return 'ternary test (right side)!'; } }} echo ( ( time() % 2 ) == 0 ? ns:test1::getMessage() : ns:test2::getMessage() ); ?>