History log of /PHP-8.2/Zend/tests/enum/internal_enums.phpt (Results 1 – 5 of 5)
Revision Date Author Comments
# 9b984f52 23-Aug-2022 Ollie Read

Enum error message consistency (#9350)


# d62d50b8 08-May-2022 Ilija Tovilo

Add C API for getting backed enum case by value

Closes GH-8518


# 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 ...


# 805f2b98 02-Sep-2021 Máté Kocsis

Fix forgotten test


# 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 ...