On Tue, Aug 07, 2001 at 09:26:48AM -0700, Mark Maggelet wrote:
> 
> This isn't right, empty() won't give an error if $input isn't set.

That's true. Empty() doesn't return an error when $input isn't
defined. I didn't RT(F)M on this one. I always use "(!isset($something)
&& empty($something))" to check whether or not $something is empty/not
set.
It's realy more of a feeling. Empty() actualy only checks for a
value in $something. It's basicaly the same as "(!$something)"
except that empty() doesn't return a warning if $something isn't set
(...look, this time I did RTM :).
So... basicaly, with empty() you don't check if $something is set.
You just don't get to know it. So that's why I use isset() with it.
I know the result is the same, but hey... I'm the same guy that
checks the returnvalue of printf() and stuff (another thread in this
list). So... well... Let's just say I have a 'checking-fetish' of
some kind :p

-- 

* R&zE:

-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to