Re: [PHP] Do PHP boolean operators short circuit?
* Thus wrote Jason Wong ([EMAIL PROTECTED]): On Saturday 20 September 2003 10:57, John W. Holmes wrote: [snip] From my experience, it will work that way. I don't know if it's that way for every version or not, though. manual Migrating from PHP/FI 2 to PHP 3 heh... i havn't seen a PHP/FI reference in a long while, thanks for reminding us how far php has come along today :) cheers. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Do PHP boolean operators short circuit?
I am learning perl and my book describes boolean short circuiting. Basically: function1() OR function2(); (function2 never is evaluated if function1 is true). Will this work in PHP for any function? Thanks in advance, -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Do PHP boolean operators short circuit?
Dan Anderson wrote: I am learning perl and my book describes boolean short circuiting. Basically: function1() OR function2(); (function2 never is evaluated if function1 is true). Will this work in PHP for any function? Yes. From my experience, it will work that way. I don't know if it's that way for every version or not, though. Same thing for AND, too... function1() AND function2() If function1() comes out FALSE, then function2() isn't evaluated. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Do PHP boolean operators short circuit?
On Saturday 20 September 2003 10:57, John W. Holmes wrote: [snip] From my experience, it will work that way. I don't know if it's that way for every version or not, though. manual Migrating from PHP/FI 2 to PHP 3 -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Flirting is the gentle art of making a man feel pleased with himself. -- Helen Rowland */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php