History log of /PHP-8.1/Zend/tests/enum/internal_enums.phpt (Results 1 – 3 of 3)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 93fc88e8 25-May-2022 Ilija Tovilo

Fix Enum::from/tryFrom memory leak in JIT for internal enums

when passing an int to a string enum. Previously, the int was coerced to
a string. The JIT skips parameter clean up when unne

Fix Enum::from/tryFrom memory leak in JIT for internal enums

when passing an int to a string enum. Previously, the int was coerced to
a string. The JIT skips parameter clean up when unnecessary. In this
particular case, passing int to from(int|string) normally doesn't cause
a coercion so no dtor for the $value zval is generated.

To circumvent this we avoid coersion by explicitly allowing ints and
converting them to strings ourselves. Then we can free it appropriately.

See GH-8518
Closes GH-8633

show more ...

Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3, php-8.1.2RC1, php-8.1.0, php-7.3.33, php-7.3.32, php-7.3.31
# 805f2b98 02-Sep-2021 Máté Kocsis

Fix forgotten test

Revision tags: php-7.3.30
# 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 ...