|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-29 08:46 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
Description: ------------ 'pictures' should be 8 string length. Thought, I got the result. It said that 'pictures' is 13 string length. It isn't correct. I notice that I use different words. It shows that string length is added with 5 practically. You can see that 8 (pcitures) length + 5 add length = 13 string length. I don't know why it is. Reproduce code: --------------- function word_match($a=null,$b=null) { print("Orginal A: $a<br>"); $a_length = strlen($a); $b_length = strlen($b); $search = true; $length = 0; while($search) { if(substr($b,$length,$a_length)==$a) { $search = false; $result = true; }elseif($length>$b_length){ print("<b>Websatellite: A: $a B: $b ($length>$b_length)</b>"); $result = false; $search = false; } print("<b><br>Websatellite: ($a_length) ".substr($b,$length,$a_length)."==$a</b>"); $length++; } return $result; }