note 82974 added to control-structures.if

From: Date: Mon, 05 May 2008 00:01:39 +0000
Subject: note 82974 added to control-structures.if
Groups: php.notes 
Request: Send a blank email to php-notes+get-139057@lists.php.net to get a copy of this message
When you use if command with many condidions like if ( expr1 && expr2 && expr3 && etc. ) it is more effective to put expressions in special order Firstly you should put that, which has the biggest probability to occur. This is because PHP checks each condition in order from left to right and it takes some time to check each condition. ---- Server IP: 69.147.83.197 Probable Submitter: 86.164.231.126 ---- Manual Page -- http://www.php.net/manual/en/control-structures.if.php Edit -- https://master.php.net/note/edit/82974 Del: integrated -- https://master.php.net/note/delete/82974/integrated Del: useless -- https://master.php.net/note/delete/82974/useless Del: bad code -- https://master.php.net/note/delete/82974/bad+code Del: spam -- https://master.php.net/note/delete/82974/spam Del: non-english -- https://master.php.net/note/delete/82974/non-english Del: in docs -- https://master.php.net/note/delete/82974/in+docs Del: other reasons-- https://master.php.net/note/delete/82974 Reject -- https://master.php.net/note/reject/82974 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#139057) next »