The rule reads backwards from how everyone assumes it works. declare(strict_types=1) governs the calls made from that file, not the calls made into the functions declared in it.…
The upgrade is usually measured in request latency. The larger operational change is memory: PHP 7 rewrote the internal value representation, and arrays in particular use a fraction…
Objects cannot be array keys, so checking whether an object is already in a collection usually turns into in_array($obj, $list, true) — a linear scan that gets slower…
Code that calls time() or new DateTime() internally cannot be tested at a chosen moment. The usual workarounds are a sleep() in the test, which makes the suite…
A PHP warning does not stop execution. file_get_contents() on a missing file warns and returns false, and the code carries on with false where a string was expected…