-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PHP] Updates to keep up with PHP 8 #2997
Commits on Feb 14, 2021
-
[PHP] Add WeakMap class to internal list
PHP 8.0 adds a new [`WeakMap` built-in class](https://php.watch/versions/8.0/weakmap). Adding it to `KEYWORDS.keyword` list.
Configuration menu - View commit details
-
Copy full SHA for 3eb97e5 - Browse repository at this point
Copy the full SHA 3eb97e5View commit details -
[PHP] Add
UnhandledMatchError
exception typePHP 8.0 match expression throws an [`UnhandledMatchError` exception](https://php.watch/versions/8.0/match-expression#UnhandledMatchError). It's a new built-in exception type, and adding it the keywords list.
Configuration menu - View commit details
-
Copy full SHA for 5f758e1 - Browse repository at this point
Copy the full SHA 5f758e1View commit details -
[PHP] Add new
mixed
type in PHP 8.0PHP 8.0 adds a new [`mixed` type](https://php.watch/versions/8.0/mixed-type) as a new reserved keyword and a type.
Configuration menu - View commit details
-
Copy full SHA for 4750304 - Browse repository at this point
Copy the full SHA 4750304View commit details -
[PHP] Add
Stringable
interfacePHP 8.0 adds a new built-in interface called [`Stringable`](https://php.watch/versions/8.0/stringable). Adding it to the keywords list.
Configuration menu - View commit details
-
Copy full SHA for 7200fc6 - Browse repository at this point
Copy the full SHA 7200fc6View commit details -
[PHP] Add
trait
to list of class-like naming patternsTraits follow [class-like syntax](https://www.php.net/manual/en/language.oop5.traits.php), and was missing from the class-like naming pattern matches.
Configuration menu - View commit details
-
Copy full SHA for 368c792 - Browse repository at this point
Copy the full SHA 368c792View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e88f4d - Browse repository at this point
Copy the full SHA 1e88f4dView commit details -
[PHP] Number pattern improvements
Expands the number detection to support to all numerals supported up to PHP 8.1. - Decimal numbers - Floats - Binary numbers (`0b1100` and `0B1100`). - Hex number support (`0xAFAF` and `0XAFAF`). - Octal number support (`0777`) - [New `0o` and `0O` prefix support for Octals](https://php.watch/versions/8.1/explicit-octal-notation) (`0o777` and `0O777`) (Already accepted and merged to upcoming PHP 8.1) - Scientific notation (`7E-10` and `1.2e3`) - [Underscore number separator](https://php.watch/versions/7.4/underscore_numeric_separator) (Already implemented in PHP 7.4)
Configuration menu - View commit details
-
Copy full SHA for eec1a96 - Browse repository at this point
Copy the full SHA eec1a96View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9b9abc - Browse repository at this point
Copy the full SHA f9b9abcView commit details