You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
array_values() and array_merge() (and similar reindexing/copy builtins) must return arrays whose elements remain enum case objects. This compiler copies backing integers (backed enums) instead of enum(E::A) objects.
Category
stdlibProblem
array_values()andarray_merge()(and similar reindexing/copy builtins) must return arrays whose elements remain enum case objects. This compiler copies backing integers (backed enums) instead ofenum(E::A)objects.php-src reference
Zend/zend_enum.cext/standard/array.c—php_array_values,php_array_mergeRepro
test/repro-maintainer/parity_array_values_merge_enum.php:array_values([E::B,E::A])array(0=>enum(E::B),1=>enum(E::A))array(0=>int(2),1=>int(1))array_merge([E::A],[E::B])int(1),int(2)Scope (this repo)
ext/standard/array_values.php,array_merge.php,lib/VM/EnumCaseSupport.phptest/compliance/cases/stdlib/array_values_merge_enum.phptDone when
var_dumpmatches Zend on VM./script/ci-fast.sh --filter array_values_merge_enumgreenRelated