Re: [PHP4BETA] broken or probably not implement!
| From: | Zeev Suraski | Date: | Fri, 18 Feb 2000 13:23:47 +0000 |
| Subject: | Re: [PHP4BETA] broken or probably not implement! | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-10448@lists.php.net to get a copy of this message | ||
On Fri, 18 Feb 2000, Hartmut Holzgraefe wrote:
> Faisal Nasim wrote:
>
> > : I'm not sure what you're saying here, all of the results reported by PHP
> > : are correct. 10||1 is true (boolean). The fact that Perl reports 10 is
> >
> > Then why:
> >
> > $str = 10 or 1 // = 10
> > and
> > $str = 0 or 1 // = 0
> >
> > 0 is false, and 'or' has low precedence, so result should be 1!
> >
>
> or is so 'weak' that your statement above is equivalent to
>
> ( $str = 0 ) or 1
>
> although you wanted
>
> $str = ( 0 or 1 ) // =1
Actually that's not it, ($str=0 or 1) equals 1.
Zeev
>
>
> --
> Hartmut Holzgraefe hartmut@six.de
> http://www.six.de
>
> Besuchen Sie Six auf der CeBIT (24.2.-1.3.) in Halle 10, Stand 425,
> und auf der Hannover-Messe (20.-25.3.) in Halle 14, Stand J50!
>
>
>
>
>
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/