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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php