The following valid code:
class Test
{
public const FINAL = 123;
public static function final() {
echo __METHOD__, PHP_EOL, self::FINAL, PHP_EOL;
}
}
breaks when BypassFinals is enabled. This is because both the constant and function name are recognized as T_FINAL, but contextually not treated as keywords (modifiers), thanks to context sensitive lexer added in PHP 7.0: https://wiki.php.net/rfc/context_sensitive_lexer