Re: bug in str_split function?

From: Date: Fri, 21 Jan 2005 20:17:49 +0000
Subject: Re: bug in str_split function?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-206985@lists.php.net to get a copy of this message
chris wrote: > No good. > > I made the change to this (note the echo ping statements) > /////////////////// start > <?PHP > $test='this is test'; > echo $test; > echo '<br>ping 1<br>'; > $test2=str_split($test); > echo 'ping 2<br>'; > echo '<pre>'; > for($i=0;$i<count($test2);$i++) > { > print_r($test2[$i]); > } > echo '</pre>'; > ?> > /////////////////// end > > result is now > ///////////////// > this is test > ping 1 > ///////////////// Most rational explanation: Fact 1: str_split is only available in PHP 5, according to TFM. Fact 2: It's *POSSIBLE* to set up error_reporting/error_log to not appear in the browser. Hypothesis: You have an error message going somewhere telling you that str_split is not a defined function, because you are running PHP 4 (or PHP 3, or even PHP 2, in theory)... Lab Test: Does <?php phpinfo();?> say you are running PHP 5? -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#206985) next »