ID:               50801
 Updated by:       [email protected]
 Reported By:      public at proside dot fr
 Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: WIN XP SP3
 PHP Version:      5.3.1
 New Comment:

No, the '.' operator is defined as the string concatenation operator. 

Just like using it to concat numbers will cast the numbers to strings,

using it to concat nulls will cast the nulls to strings and when you 
cast a null to a string you get an empty string.


Previous Comments:
------------------------------------------------------------------------

[2010-01-19 17:18:35] [email protected]

php -r 'echo NULL;'

------------------------------------------------------------------------

[2010-01-19 17:16:49] public at proside dot fr

Description:
------------
When you concatenate only NULL values, you got an empty string

Reproduce code:
---------------
$a = NULL;
$b = NULL;
$c = $a . $b;

echo (is_null($c)) ? 'TRUE' : 'FALSE';


Expected result:
----------------
TRUE

Actual result:
--------------
FALSE

If you look : $c = ""


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50801&edit=1

Reply via email to