note 84008 added to function.trim

From: Date: Mon, 23 Jun 2008 17:27:28 +0000
Subject: note 84008 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-140745@lists.php.net to get a copy of this message
Someone posted this over two years ago, but it is still just as valid today. Frankly, it should be added to the documentation on this page. This is NOT the functionality I would expect in this case. With all this talk about trimming array values, it should be known that accidentally using the trim() function with an array() argument ... <?php $array = array(1, 2, 3); $array = trim($array); print_r($array); // prints "Array" echo($array); // also prints "Array" ?> ... yields the string "Array" ---- Server IP: 209.41.74.194 Probable Submitter: 166.70.44.49 ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit -- https://master.php.net/note/edit/84008 Del: integrated -- https://master.php.net/note/delete/84008/integrated Del: useless -- https://master.php.net/note/delete/84008/useless Del: bad code -- https://master.php.net/note/delete/84008/bad+code Del: spam -- https://master.php.net/note/delete/84008/spam Del: non-english -- https://master.php.net/note/delete/84008/non-english Del: in docs -- https://master.php.net/note/delete/84008/in+docs Del: other reasons-- https://master.php.net/note/delete/84008 Reject -- https://master.php.net/note/reject/84008 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140745) next »