> De : Damien Tournoud [mailto:d...@damz.org] > > All those are due to a bug in substr(), that we see now only thanks to > proper type identification. There is no reason for substr() to ever return > a boolean. It really needs to be fix to always return a string.
Sorry, not a bug. Documentation is clear. You get 'string|false' from substr() and send it to a function expecting 'string'. Most languages will fail on this. It worked in PHP because of implicit casting from bool to string. We just decided to deprecate this implicit cast. Now, we can discuss about substr(), whether it should always return string or not. But that's another subject. Regards François -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php