Fix bug #79868 This simply restores the code from PHP 7.4 which I incorrectly "simplified" in master.