#39838 [Com]: split function correctly

From: Date: Fri, 15 Dec 2006 02:02:08 +0000
Subject: #39838 [Com]: split function correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106372@lists.php.net to get a copy of this message
ID: 39838 Comment by: judas dot iscariote at gmail dot com Reported By: lu at icst dot org dot tw Status: Open Bug Type: Unknown/Other Function Operating System: Fedora Core 3 and 6 PHP Version: 5.2.0 New Comment: hank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [2006-12-15 01:45:24] lu at icst dot org dot tw Description: ------------ Test on FC3, FC6 ( RedHat Fedora) On FC3, PHP version is 4.3.11 On FC6, PHP version is 5.1.6 $strary = split("[@#^!]", $password); <== if $password = aaaaa@ , $num =2 <= incorrectly on FC3 , FC6 (Fedora) if $password = @aaaaa , $num =2 <= incorrectly on FC3 , FC6 (Fedora) if $password = a@a@a , $num=3 <= correctly if $password = a@a , $num=2 <= correctly $num = count($strary); $s=""; // debug if (!(ctype_alnum($s))) echo "false<br>"; // debug echo "num = " . $num . "<BR>"; // debug for ($ii = 0; $ii < $num; $ii++) { echo "strary[ii] = " . $strary[$ii] . "<BR>"; // debug if (!(ctype_alnum($strary[$ii]))) { return "Password must containw@ # ^ !x";//"a password should contain only alphanumeric characters and @ # ^ !"; } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39838&edit=1

« previous php.bugs (#106372) next »