Modernizing PHP one edge case at a time
summary
Walks through exact PHP oddities and the fixes: string "0" is falsy and SimpleXML can make objects evaluate false, GMP boolean-cast bug becomes false in PHP 8.4, comparison rules sometimes force the left operand to be “greater” and array_intersect casts values to strings so arrays collide, string increment spills into numeric semantics prompting a new str_increment helper, range and step edge cases start throwing ValueError in 8.3, disable_functions/classes can cause segfaults, and strict_types applies per file while the engine still uses coercive calls.
AI-written summary · about
chapters (13)
- 0:00PHP modernization intro
- 1:52PHP Foundation role
- 2:35Falsy values in PHP
- 6:08Comparison operators casting
- 9:03String numeric quirks
- 12:58Array intersection casting
- 17:59Incrementing booleans null
- 20:51String incrementation edge cases
- 26:03Range function behavior
- 31:25ArrayObject inconsistencies
- 37:25Disabling PHP functions
- 40:34Strict types limitations
- 44:04Modernization goals







