|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-10-11 08:49 UTC] nikic@php.net
[2021-10-12 12:12 UTC] nikic@php.net
-Summary: Bug in enums implementation.
+Summary: Cannot use enum as property default in internal class
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 01:00:01 2025 UTC |
Description: ------------ There is no way to create instance of enum in PHP extension as function is not exported Test script: --------------- zval property___status_default_value; ZVAL_NULL(&property___status_default_value); zend_enum_new(&property___status_default_value, promise_enum, zend_string_init("Resolving", sizeof("Resolving") - 1, 1), NULL); zend_string * property___status = zend_string_init("status", sizeof("status") - 1, 1); Expected result: ---------------- Enum instance should be created. Actual result: -------------- php: symbol lookup error: /opt/php/php8/lib/php/extensions/no-debug-non-zts-20210902/fileio.so: undefined symbol: zend_enum_new