On 20.10.2019 at 17:00, Colin O'Dell wrote: > Is there any particular reason why the substr() function doesn't accept a > null $length like mb_substr() does? It seems the behavior to read through > the end of the string can only be controlled by the presence or absence of > the $length parameter: https://3v4l.org/YpuO1
The reason for this behavioral inconsistency is that when mb_substr()'s behavior has been changed[1], substr()'s has not. Due to the subtle BC break, in my opinion, this shouldn't have been changed in a revision (happened for 5.4.8); a major version is *more* suitable for such changes. > I'd be happy to write the RFC […] It seems to me that an RFC would be overkill for this change, but it has to be discussed. Tentatively, I'm +0.5 on this change. [1] <https://github.com/php/php-src/commit/352a1956b60059f9792cac840d57b184c7305667> -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php