[dev] Re: [cvs] commit: horde/lib String.php

Jan Schneider jan at horde.org
Tue Jan 28 11:18:23 PST 2003


Zitat von Amith Varghese <amith at xalan.com>:

> > For what it's worth, !empty() seems to be as fast as isset() (makes
> > intuitive sense, since they're both engine-level calls). So perhaps:
> >
> > 1. use !empty() when you're checking for non-empty data.
> > 2. use array_key_exists() when false or null is okay
> >
> 
> attached is a patch for the CODING_STANDARDS doc to reflect Jan's
> findings....
> Useful info for newcomers.

Even better would be if you also reflect the different behaviours of
empty(), isset() and array_key_exists() and point out (based on Chucks
comments) when to use which.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the dev mailing list