note 91269 added to function.trim

From: Date: Wed, 03 Jun 2009 07:26:06 +0000
Subject: note 91269 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-156307@lists.php.net to get a copy of this message
The example provided by Andrew below seems not be equal to specify all character list (both default and user defined). Consider the example below: <?php $str = "Hallo World\t\t@@\t\t"; $res1 = trim( trim( $str ), "./@#$" ); $res2 = trim( $str, "./@#$ \t\n\r\0\x0B" ); var_dump( $str ); var_dump( $res1 ); var_dump( $res2 ); ?> ---- Server IP: 82.177.164.100 Probable Submitter: 79.162.159.132 ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit -- https://master.php.net/note/edit/91269 Del: integrated -- https://master.php.net/note/delete/91269/integrated Del: useless -- https://master.php.net/note/delete/91269/useless Del: bad code -- https://master.php.net/note/delete/91269/bad+code Del: spam -- https://master.php.net/note/delete/91269/spam Del: non-english -- https://master.php.net/note/delete/91269/non-english Del: in docs -- https://master.php.net/note/delete/91269/in+docs Del: other reasons-- https://master.php.net/note/delete/91269 Reject -- https://master.php.net/note/reject/91269 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#156307) next »