Closed TysonAndre closed 3 years ago
https://wiki.php.net/rfc/enumerations currently says
Scalar equivalent values must be literals. Constants and constant expressions are not supported.
This was relaxed to allow -1 - -1 is not a literal
-1
0 => AST_UNARY_OP [UNARY_MINUS] #1 expr => 1
The representation of PHP_INT_MIN is not a literal (9223372036854775808 is a float, and the negation of a float is a float)
php > var_export(PHP_INT_MIN); -9223372036854775807-1
Related to #56
RFC updated accordingly.
https://wiki.php.net/rfc/enumerations currently says
This was relaxed to allow
-1
--1
is not a literalThe representation of PHP_INT_MIN is not a literal (9223372036854775808 is a float, and the negation of a float is a float)
Related to #56