From: [EMAIL PROTECTED] Operating system: Windows 98 PHP version: 4.2.3 PHP Bug Type: Feature/Change Request Bug description: substr does not always return a string
substr($s,$n,$m) is supposed to always return a string (at least if $s is a string and $n and $m are integers). However: is_string(substr($s,strlen($s),$m)) returns false, so substr did not return a string. Example: $s="<AB attr = \n\"value\" >"; echo is_string("")."<BR>\n"; echo "substr(\"A\",0,1):".is_string(substr("A",0,1))."<BR>\n"; echo "substr(\"A\",0,0):".is_string(substr("A",0,0))."<BR>\n"; echo "substr(\"A\",1,1):".is_string(substr("A",1,1))."<BR>\n"; echo "substr(\"A\",1,0):".is_string(substr("A",1,0))."<BR>\n"; -- Edit bug report at http://bugs.php.net/?id=20695&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20695&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20695&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20695&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20695&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20695&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20695&r=support Expected behavior: http://bugs.php.net/fix.php?id=20695&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20695&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20695&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20695&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20695&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20695&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20695&r=isapi