Re: Re: PHP 5.1 (Or How to break tousands of apps out there)

From: Date: Fri, 25 Nov 2005 21:52:51 +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  Groups: php.internals 
Request: Send a blank email to internals+get-20450@lists.php.net to get a copy of this message
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

« previous php.internals (#20450) next »