Just want to note that if you are retrieving sub-strings of
length zero, this function breaks in the base case (the
source being an empty string):
substr('123',0,0) returns string(0) ""
substr('12',0,0) returns string(0) ""
substr('1',0,0) returns string(0) ""
but
substr('',0,0) returns bool(false)
Although this is the documented behavior, I would consider
it unexpected in many circumstances.
----
Server IP: 69.147.83.197
Probable Submitter: 72.8.117.17
----
Manual Page -- http
://www.php.net/manual/en/function.substr.php
Edit -- https://master
.php.net/note/edit/78410
Del: integrated -- h
ttps://master.php.net/note/delete/78410/integrated
Del: useless -- http
s://master.php.net/note/delete/78410/useless
Del: bad code -- htt
ps://master.php.net/note/delete/78410/bad+code
Del: spam -- https:/
/master.php.net/note/delete/78410/spam
Del: non-english --
https://master.php.net/note/delete/78410/non-english
Del: in docs -- http
s://master.php.net/note/delete/78410/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78410
Reject -- https://mast
er.php.net/note/reject/78410
Search -- https://
master.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|