ID: 27190 Updated by: [EMAIL PROTECTED] Reported By: tohar at sphera dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: all PHP Version: 4.3.4 New Comment:
And that's what it is..no bug here. Previous Comments: ------------------------------------------------------------------------ [2004-02-09 05:28:13] [EMAIL PROTECTED] Next time use var_dump() which is better. Looks like \0 is intepreted as NULL byte. <?php $x1 = 'a\b\c\22\0||TYPE'; $x2 = 'a\b\c\22\13||TYPE'; var_dump(stripslashes($x1)); echo "\n"; var_dump(stripslashes($x2)); echo "\n"; ?> Output : string(12) "abc22||TYPE" string(13) "abc2213||TYPE" ------------------------------------------------------------------------ [2004-02-09 04:42:47] tohar at sphera dot com Description: ------------ When using stripslashes function on a string with \0, the 0 character which should have returned, doesnt returned!!! Reproduce code: --------------- <? $x1 = 'a\b\c\22\0||TYPE'; $x2 = 'a\b\c\22\13||TYPE'; echo stripslashes($x1); echo "<BR>"; echo stripslashes($x2); ?> Expected result: ---------------- abc220||TYPE abc2213||TYPE Actual result: -------------- abc22||TYPE abc2213||TYPE ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27190&edit=1