Thread: Differents...
View Single Post
Old 06-22-2008, 06:10 PM   #4 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

I know of at least one instance where the #6 differs. Take the following as an example:

php Code:
$aValue = array();

if ($aValue == null)
{
    die('Ended within here');
}

die('Ended over here');

Juxtaposed with:

php Code:
$aValue = array();

if ($aValue == '')
{
    die('Ended within here');
}

die('Ended over here');

I surmise that's something to do with the fact that the array is null. It is not null to the variable because it holds a skeleton of an array, but the array, per se, is null.

When you attempt to validate it by specifying a string value, I.E: '', then you are attempting to classify it as a string, and as aforementioned, the variable is not null in that sense because it holds an array -- an empty, or null, array.

Am I right, or am I way off? Somebody please help.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote