Merged
Girgias deleted the explicit-octal-notation branch
January 4, 2021 20:10jrfnl added a commit to PHPCSStandards/PHPCSUtils that referenced this pull request
Feb 28, 2022This add support for the explicit octal notation using a `0o`/`0O` prefix as supported in PHP as of PHP 8.1. The only method which needed adjusting was the `Numbers::getCompleteNumber()` method, which now backfills the tokenization when needed. For the `Numbers::isOctalInt()` method, a small tweak to the regex was all that was needed. As for the `Numbers::getDecimalValue()` method: this already handled the conversion correctly due to the use of the PHP native `octdec()` function. From the RFC: > Surprisingly PHP already has support for this notation when using the `octdec()` and `base_convert()` functions. Includes adding unit tests to safeguard support in all relevant methods in the class. Refs: * https://wiki.php.net/rfc/explicit_octal_notation * php/php-src#6360 * squizlabs/PHP_CodeSniffer#3481 * squizlabs/PHP_CodeSniffer#3552
jrfnl
mentioned this pull request
Merged
jrfnl added a commit to PHPCompatibility/PHPCompatibility that referenced this pull request
Dec 5, 2022jrfnl added a commit to PHPCompatibility/PHPCompatibility that referenced this pull request
Dec 5, 2022
jrfnl
mentioned this pull request
Merged
adrian-enspired pushed a commit to adrian-enspired/php-src that referenced this pull request
Aug 4, 2026