note 118296 added to language.operators.precedence

From: Date: Tue, 10 Nov 2015 17:39:53 +0000
Subject: note 118296 added to language.operators.precedence
Groups: php.notes 
Request: Send a blank email to php-notes+get-204133@lists.php.net to get a copy of this message
Sometimes it's easier to understand things in your own examples. If you want to play around operator precedence and look which tests will be made, you can play around with this: <?php function F($v) {echo $v." "; return false;} function T($v) {echo $v." "; return true;} IF (F(0) || T(1) && F(2) || F(3) && ! F(4) ) { echo "true"; } else echo " false"; ?> Now put in IF arguments f for false and t for true, put in them some ID's. Play out by changing "F" to "T" and vice versa, by keeping your ID the same. See output and you will know which arguments actualy were checked. ---- Server IP: 72.52.91.14 Probable Submitter: 95.68.58.120 ---- Manual Page -- http://php.net/manual/en/language.operators.precedence.php Edit -- https://master.php.net/note/edit/118296 Del: integrated -- https://master.php.net/note/delete/118296/integrated Del: useless -- https://master.php.net/note/delete/118296/useless Del: bad code -- https://master.php.net/note/delete/118296/bad+code Del: spam -- https://master.php.net/note/delete/118296/spam Del: non-english -- https://master.php.net/note/delete/118296/non-english Del: in docs -- https://master.php.net/note/delete/118296/in+docs Del: other reasons-- https://master.php.net/note/delete/118296 Reject -- https://master.php.net/note/reject/118296 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204133) next »