Re: Check Variable with true or not
| From: | Maciek Sokolewicz | Date: | Mon, 29 Sep 2008 10:39:47 +0000 |
| Subject: | Re: Check Variable with true or not | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281082@lists.php.net to get a copy of this message | ||
Carlos Medina wrote:
Hi @ all: Question: what is quickly? if( true == isset( $var ) ){} or if( isset( $var ) ){} Can somebody explain ( not think or believe ), what happend on the Zend Engine when the first or the second code will be use? Regards Carlos The _exact_ same thing happens.#1 (with the == true) results in an extra opcode compared to the other, thus making it a very very very tiny bit "slower". But other than that, there is _no_ difference _at all_. And trust me, you won't see _any_ difference in execution time by changing the first into the other, it's so infintissimally tiny. - Tul