note 75999 deleted from function.substr by googleguy
| From: | googleguy@php.net | Date: | Tue, 16 Oct 2012 12:00:04 +0000 |
| Subject: | note 75999 deleted from function.substr by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191330@lists.php.net to get a copy of this message | ||
Note Submitter: lanny at freemail dot hu
----
Starting from version 5.2.3 if $start is negative and larger then the length of the string, the
result is an empty string, while in earlier versions the result was the string itself!
substr ("abcdef", -1000);
result in 5.2.0
'abcdef'
result in 5.2.3
''
This is a small inconsistency, one of those things that makes the life of a PHP programmer like
hell.