strpos
that I can't understand - maybe I have a fundamental misunderstanding somewhere or maybe something else is wrong. I feel totally clueless atm and would appreciate another set of eyes (and braincells) looking at this.I have added some logging and with that, the surprise comes from this code:
Code: Select all
$c1=-1
$c = strpos($currh,">",$c1);
$rep .= "strpos(" . quote($currh) . "," . quote(">") . ",$c1)=$c<crlf>";
Code: Select all
strpos("Apps>FinePrint",">",-1)=0
echo
and copy it into the address bar and execute it, it returns 4 - as expected.So I added some more code to see if that really misbehaves as it seems to do:
Code: Select all
$currh = "Apps>FinePrint";
$c = strpos($currh,">",$c1);
$rep = "strpos(" . quote($currh) . "," . quote(">") . ",$c1)=$c<crlf>";
Code: Select all
strpos("Apps>FinePrint",">",-1)=4
strlen
... Let's see:
Code: Select all
$rep .= "strpos(" . quote($currh) . "," . quote(">") . ",$c1)=$c<crlf>strlen(currh)=" . strlen($currh) . <crlf>;
Code: Select all
strpos("Apps>FinePrint",">",-1)=0
len(currh)=14