We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Good day.
Your classnames for types (PHPAST\Integer, PHPAST\Float etc) clashes with reserved keywords in PHP 7.
PHPAST\Integer
PHPAST\Float
Attempting to load your library in your provided examples will result in the following:
Fatal error: Cannot use 'Float' as class name as it is reserved in /project/vendor/flaviovs/phpast/src/core/types.php on line 42
From the PHP manual,
The following words cannot be used to name a class, interface or trait, and they are also prohibited from being used in namespaces.
float (as of PHP 7)
I suggest suffixing your classnames with something like Token or Type, so your classes become FloatToken or FloatType to get around this issue.
Token
Type
FloatToken
FloatType
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Good day.
Your classnames for types (
PHPAST\Integer
,PHPAST\Float
etc) clashes with reserved keywords in PHP 7.Attempting to load your library in your provided examples will result in the following:
From the PHP manual,
I suggest suffixing your classnames with something like
Token
orType
, so your classes becomeFloatToken
orFloatType
to get around this issue.The text was updated successfully, but these errors were encountered: