note 65189 added to language.control-structures

From: Date: Wed, 26 Apr 2006 13:54:35 +0000
Subject: note 65189 added to language.control-structures
Groups: php.notes 
Request: Send a blank email to php-notes+get-109745@lists.php.net to get a copy of this message
As Niels mentioned, PHP is (lazy) minimal-evaluative as C. If you want to evaluate all conditions (in some case one or more conditions is a function call and so on...) you can use the corresponding (to the logical operator) bitwise operator. Example: <?php if ($condition & some_function()) //do something ?> This way, even when $condition is false, some_function will be called. Liloubingo: ?: is an operator just as any other operator and you can use it the way you use any other operator (watching the rules ofcourse)... ---- Server IP: 217.75.128.29 Probable Submitter: 83.142.20.26 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/language.control-structures.php Edit -- http://master.php.net/note/edit/65189 Del: integrated -- http://master.php.net/note/delete/65189/integrated Del: useless -- http://master.php.net/note/delete/65189/useless Del: bad code -- http://master.php.net/note/delete/65189/bad+code Del: spam -- http://master.php.net/note/delete/65189/spam Del: non-english -- http://master.php.net/note/delete/65189/non-english Del: in docs -- http://master.php.net/note/delete/65189/in+docs Del: other reasons-- http://master.php.net/note/delete/65189 Reject -- http://master.php.net/note/reject/65189 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#109745) next »