Re: Re: PHP 5.1 (Or How to break tousands of apps out there)
| From: | Marcus Boerger | Date: | Fri, 25 Nov 2005 21:59:26 +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-20453@lists.php.net to get a copy of this message | ||
Hello Jessie,
that's only one case,go with consts. now try
$x = $y ? foo:bar:baz:stupid;
now what?
best regards
marcus
Friday, November 25, 2005, 10:52:51 PM, you wrote:
> Hello Rasmus,
> Rasmus Lerdorf wrote:
>> Jessie Hernandez wrote:
>>>
>>> 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.
>>
>> -Rasmus
> Not in my patch! I just tested the example below with my patch, and it
> works *PERFECTLY*:
> <?php
> namespace ns
> {
> class 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() );
?>>
> Regards,
> Jessie
Best regards,
Marcus