[development] Notice
Neil Drumm
drumm at delocalizedham.com
Tue Mar 27 21:27:47 UTC 2007
On 3/27/07, Karoly Negyesi <karoly at negyesi.net> wrote:
> b) Do not introduce notices with your patches. If you want to write if
> ($foo) or $foo ? use if(!empty($foo)).
> c) if (count($foo)) and if (sizeof($foo)) are much slower than if
> (!empty($foo))
>
> empty and isset are the same speed and do not throw notices. if something
> is not set or NULL, then isset is TRUE. if something is not set or NULL or
> empty array, 0 or '' or '0' then empty is TRUE.
My favorite reference for PHP's comparison madness is at
http://www.php.net/manual/en/types.comparisons.php.
--
Neil Drumm
http://delocalizedham.com
More information about the development
mailing list