Reply To: [PHP 8] `substr` returns empty string on offsets larger than string. It was `false` before

#2585
jkoudys
Guest

I’m somewhat divided on this one. Limiting mixed-type returns is usually easier to reason about, and the `false` feels legacy as the standard mixed type for this kind of thing nowadays is a null. On the other hand, you’re losing useful information since substrings could be made with an equal start and end that would be empty, while if they were beyond the length before would’ve been false.