Re: form validation code
| From: | Richard Quadling | Date: | Wed, 30 Jun 2010 14:01:52 +0000 |
| Subject: | Re: form validation code | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-306568@lists.php.net to get a copy of this message | ||
On 30 June 2010 14:53, Shreyas Agasthya <shreyasbr@gmail.com> wrote:
> http://www.php.net/manual/en/types.comparisons.php
> The first table actually gives a very good understanding.
> --Shreyas
>
> On Wed, Jun 30, 2010 at 7:05 PM, Richard Quadling <rquadling@gmail.com>
> wrote:
>>
>> On 30 June 2010 14:23, Daniel P. Brown <daniel.brown@parasane.net> wrote:
>> > (Hint: isset != empty)
>>
>> More importantly ...
>>
>> isset != !empty
>>
>> $a = Null;
>> $b = '';
>> // $c = undefined;
>> $d = 'Hello';
>>
>> isset($a) = False vs True = empty($a)
>> isset($b) = True vs True = empty($b)
>> isset($c) = False vs True = empty($c)
>> isset($d) = True vs False = empty($d)
>>
>>
>>
>> --
>> -----
>> Richard Quadling
>> "Standing on the shoulders of some very clever giants!"
>> EE : http://www.experts-exchange.com/M_248814.html
>> EE4Free :
>> http://www.experts-exchange.com/becomeAnExpert.jsp
>> Zend Certified Engineer :
>> http://zend.com/zce.php?c=ZEND002498&r=213474731
>> ZOPA : http://uk.zopa.com/member/RQuadling
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>
>
> --
> Regards,
> Shreyas Agasthya
>
empty() === !boolean()
and
isset() === !is_null()
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling