#
ed80a7e8 |
| 31-Mar-2023 |
Ilija Tovilo |
Merge branch 'PHP-8.1' into PHP-8.2 * PHP-8.1: Unary minus const expression consistency
|
#
41bbb116 |
| 30-Mar-2023 |
Ilija Tovilo |
Unary minus const expression consistency - of 0.0 should result in -0.0 Closes GH-10978 |
#
6b1f4c5a |
| 02-Dec-2022 |
Christoph M. Becker |
Merge branch 'PHP-8.1' into PHP-8.2 * PHP-8.1: Fix GH-9769: Misleading error message for unpacking of objects
|
#
93592ea7 |
| 17-Nov-2022 |
蝦米 |
Fix GH-9769: Misleading error message for unpacking of objects Only arrays can be unpacked in constant expressions. Closes GH-9776. |
#
1d6b32f6 |
| 21-Oct-2022 |
Ilija Tovilo |
Remove unnecessary ast eval bailout We can just reset the filename_override to NULL in php_request_shutdown. Closes GH-9805 |
#
d36874d0 |
| 02-Sep-2022 |
Ilija Tovilo |
Merge branch 'PHP-8.1' into PHP-8.2 * PHP-8.1: Fix class name FQN when AST dumping new and class const
|
#
2cfb028e |
| 01-Sep-2022 |
Ilija Tovilo |
Fix class name FQN when AST dumping new and class const Fixes GH-9447 Closes GH-9462 |
#
f957e3e7 |
| 22-Jul-2022 |
Ilija Tovilo |
Fix arrow function with never return type Fixes GH-7900 Closes GH-9103 |
#
7aadbcb8 |
| 24-May-2022 |
Ilija Tovilo |
GH-8344 Fetch properties of enums in const expressions |
#
ddc0b490 |
| 10-Mar-2022 |
Ilija Tovilo |
Allow arbitrary const expressions in backed enums Closes GH-7821 Closes GH-8190 Closes GH-8418 |
#
7850c103 |
| 16-May-2022 |
Máté Kocsis |
Add support for readonly classes (#7305) RFC: https://wiki.php.net/rfc/readonly_classes |
#
3b4eaf67 |
| 21-Apr-2022 |
Ilija Tovilo |
Merge branch 'PHP-8.1' * PHP-8.1: Fix preloading of constants containing enums
|
#
4397811d |
| 14-Apr-2022 |
Ilija Tovilo |
Fix preloading of constants containing enums Fixes GH-8133 |
#
efb014dd |
| 14-Mar-2022 |
Dmitry Stogov |
Reset EG(filename_override) after fatal error Fixes oss-fuzz #45492 |
#
e3ef7bbb |
| 05-Feb-2022 |
Ilija Tovilo |
Adjust filename/lineno for constant expressions Closes GH-7771 Closes GH-8124 |
#
944b6b6b |
| 16-Jan-2022 |
Tyson Andre |
Merge concatenated literal strings while compiling. (#7948) The output of token_get_all is unaffected, so projects such as the userland nikic/php-parser are unaffected. Ext
Merge concatenated literal strings while compiling. (#7948) The output of token_get_all is unaffected, so projects such as the userland nikic/php-parser are unaffected. Extensions such as nikic/php-ast which expose the internal php ast would see literals be flattened, though. This makes php significantly faster at parsing code such as `$x = eval('return ' . var_export(str_repeat("\0", 100), true) . ';');` and avoids the stack overflow from recursing 100000 times in zend_eval_const_expr to process `'' . "\0" . '' . "\0" . ...` Closes GH-7946 * Don't create binary op if unnecessary * Update Zend/zend_ast.c Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
show more ...
|
#
812df2bd |
| 12-Nov-2021 |
Cameron Porter |
Fix bug #81611 Add zend_fetch_class_with_scope() which accepts a scope to use for self/parent, and use that during constant expression evaluation. Closes GH-7649. |
#
f34114b1 |
| 01-Oct-2021 |
Nikita Popov |
Export AST for default value strings in reflection When dumping default values in ReflectionXXX::__toString(), for expression initializers print the AST export instead of trying to e
Export AST for default value strings in reflection When dumping default values in ReflectionXXX::__toString(), for expression initializers print the AST export instead of trying to evaluate the expression. With the introduction of "new in initializers" the result of the evaluation will commonly not be printable at all, and "__toString" will throw an exception, which is not particularly useful. Using the AST export also provides more information on how the parameter was originally declared, e.g. it preserves the fact that a certain constant was used. Closes GH-7540.
show more ...
|
#
7d6a7e78 |
| 31-Aug-2021 |
Nikita Popov |
Use array_set_zval_key() in zend_ast_add_array_element() This reimplemented basically the same logic. |
#
b964d007 |
| 26-Aug-2021 |
Nikita Popov |
Fix AST print of first class callable in anon class expr This will cause a compile error later, but the expression is printed first. Fixes oss-fuzz #37473. |
#
60484818 |
| 02-Aug-2021 |
Nikita Popov |
Add additional double to string APIs zend_double_to_str() converts a double to string in the way that (string) would (using %.*H using precision). smart_str_append_double() prov
Add additional double to string APIs zend_double_to_str() converts a double to string in the way that (string) would (using %.*H using precision). smart_str_append_double() provides some more fine control over the precision, and whether a zero fraction should be appeneded for whole numbers. A caveat here is that raw calls to zend_gcvt and going through s*printf has slightly different behavior for the degenarate precision=0 case. zend_gcvt will add a dummy E+0 in that case, while s*printf convert this to precision=1 and will not. I'm going with the s*printf behavior here, which is more common, but does result in a minor change to the precision.phpt test.
show more ...
|
#
8834cf01 |
| 27-Jul-2021 |
Nikita Popov |
Handle missing class when evaluating CONST_ENUM_INIT When resolving constants on a dynamically declared class during preloading, the enum class may not be available. Fail gracefully
Handle missing class when evaluating CONST_ENUM_INIT When resolving constants on a dynamically declared class during preloading, the enum class may not be available. Fail gracefully in that case. Possibly we shouldn't be trying to evaluate constants on non-linked classes at all?
show more ...
|
#
a374230c |
| 22-Jul-2021 |
Nikita Popov |
Add support for internal enums This adds support for internal enums with the same basic approach as userland enums. Enum values are stored as CONSTANT_AST and objects created during
Add support for internal enums This adds support for internal enums with the same basic approach as userland enums. Enum values are stored as CONSTANT_AST and objects created during constant updating at runtime. This means that we need to use mutable_data for internal enums. This just adds basic support and APIs, it does not include the stubs integration from #7212. Closes GH-7302.
show more ...
|
#
6780aaa5 |
| 02-Jun-2021 |
Nikita Popov |
Implement readonly properties Add support for readonly properties, for which only a single initializing assignment from the declaring scope is allowed. RFC: https://wiki.php.net
Implement readonly properties Add support for readonly properties, for which only a single initializing assignment from the declaring scope is allowed. RFC: https://wiki.php.net/rfc/readonly_properties_v2 Closes GH-7089.
show more ...
|
#
b6dcab2c |
| 19-Jul-2021 |
Nikita Popov |
Fix assert with attribute + first-class callable in assert This is going to result in a compile-time error, but AST printing is invoked first and should handle it gracefully. Handle it b
Fix assert with attribute + first-class callable in assert This is going to result in a compile-time error, but AST printing is invoked first and should handle it gracefully. Handle it by falling back to more generic printing code. Fixes oss-fuzz #36264.
show more ...
|