Re: Check Variable with true or not

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux