note 96125 added to function.substr-compare

From: Date: Wed, 10 Feb 2010 01:18:44 +0000
Subject: note 96125 added to function.substr-compare
Groups: php.notes 
Request: Send a blank email to php-notes+get-165813@lists.php.net to get a copy of this message
This documentation isn't entirely accurate -- the default for $length doesn't appear to be equal to the length of $main_str; it appears to be equal to the length of the longest string. For example: <?php $a = "abc123"; $b = "abc"; echo "Is the documentation correct? "; echo ((substr_compare($b, $a, 0) == (substr_compare($b, $a, 0, strlen($b)))) ? 'true' : 'false'); echo "\n"; ?> ---- Server IP: 208.69.120.55 Probable Submitter: 129.21.225.232 ---- Manual Page -- http://www.php.net/manual/en/function.substr-compare.php Edit -- https://master.php.net/note/edit/96125 Del: integrated -- https://master.php.net/note/delete/96125/integrated Del: useless -- https://master.php.net/note/delete/96125/useless Del: bad code -- https://master.php.net/note/delete/96125/bad+code Del: spam -- https://master.php.net/note/delete/96125/spam Del: non-english -- https://master.php.net/note/delete/96125/non-english Del: in docs -- https://master.php.net/note/delete/96125/in+docs Del: other reasons-- https://master.php.net/note/delete/96125 Reject -- https://master.php.net/note/reject/96125 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#165813) next »