#50801 [Opn->Bgs]: Concatenate null values gives an empty string

From: Date: Tue, 19 Jan 2010 17:18:35 +0000
Subject: #50801 [Opn->Bgs]: Concatenate null values gives an empty string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146804@lists.php.net to get a copy of this message
ID: 50801 Updated by: pajoye@php.net Reported By: public at proside dot fr -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: WIN XP SP3 PHP Version: 5.3.1 New Comment: php -r 'echo NULL;' Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#146804) next »