PHP: Fix for legacy 5.2 logic.