note 87200 deleted from function.trim by thiago

From: Date: Mon, 24 Nov 2008 11:29:55 +0000
Subject: note 87200 deleted from function.trim by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-146858@lists.php.net to get a copy of this message
Note Submitter: chriscohen ---- @Brizz, Getting a string containing the word "Array" IS the expected behaviour if you try to use this function on an array. The array will be cast to a string before it is trimmed, and as you already know, casting an array to a string will yield "Array" - printing an array will print the word "Array". These two will print the same thing: <?php $array = array(1, 2, 3); // Both of these will yield the word Array. print trim("Array"); print trim($array); ?>

« previous php.notes (#146858) next »