Bug #12663 Updated: %s 'string notator' only grabs a single word, not an entire string.

From: Date: Fri, 10 Aug 2001 01:50:40 +0000
Subject: Bug #12663 Updated: %s 'string notator' only grabs a single word, not an entire string.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-62766@lists.php.net to get a copy of this message
ID: 12663 User updated by: vallimar@sexorcisto.net Reported By: vallimar@sexorcisto.net Status: Open Bug Type: Strings related Operating System: Redhat 7.1 kernel 2.4.7 PHP Version: 4.0.6 New Comment: Ugh, they have filtered incoming port 80.. use http://www.sexorcisto.net:8008/php.php to see the configuration. Previous Comments: ------------------------------------------------------------------------ [2001-08-08 17:43:26] vallimar@sexorcisto.net <?php $bug = "this_is = a bug"; list($var1, $var2) = sscanf($bug, "%s = %s"); echo "Var1: $var1, Var2: $var2\n"; ?> Execute and you will see that it does not check on strings and any spaces will foul the results which is not good. Which means it is only checking at the word level, and stopping once it hits a space, instead of parsing the entirety as a string which is what it should be doing. I have had to switch to using explode() which is problematic because I may have more then 1 '=' sign in the string and I only want to split on the first one. Please get this fixed as it causes problems, headaches and the need to write crappily inefficent workarounds when a simple sscanf is all you should need. ---- Modules.. Hmm, I have no idea really, I installed the RPM. Goto www.sexorcisto.net/php.php for the php configuration output if you need it. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12663&edit=1

« previous php.dev (#62766) next »