note 86581 modified in language.types.array by felipe

From: Date: Fri, 24 Oct 2008 23:10:03 +0000
Subject: note 86581 modified in language.types.array by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-145729@lists.php.net to get a copy of this message
Note that NULL is not exactly a scalar value, so the following two lines of code do NOT produce identical arrays. <?php $x = (array) null; // $x ends up an empty array (zero elements) $y = array(null); // $y ends up an array containing one element (a null) ?> --was-- Note that NULL is not exactly a scalar value, so the following two lines of code do NOT produce identical arrays. $x = (array) null; // $x ends up an empty array (zero elements) $y = array(null); // $y ends up an array containing one element (a null) http://php.net/manual/en/language.types.array.php

« previous php.notes (#145729) next »