1.2.601. Invalid Octal In String

Any octal sequence inside a string can’t be go 377. Those will be a fatal error at parsing time.

The check is applied to the string, starting with PHP 7.1. In PHP 7.0 and older, those sequences were silently adapted (modulo/% 400).

<?php

// A valid octal in a PHP string
echo "\100"; // @

// Emit a warning in PHP 7.1
//Octal escape sequence overflow \500 is greater than \377
echo "\500"; // @

// Silent conversion
echo "\478"; // 8

?>

See also Integers.