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
Warning: Narrowing occurred during type inference of ZEND_FETCH_DIM_W. Please file a bug report on https://github.com/php/php-src/issues in /tmp/test.php on line 17
php: /home/phpfuzz/WorkSpace/flowfusion/php-src/Zend/Optimizer/zend_inference.c:2086: void emit_type_narrowing_warning(const zend_op_array *, zend_ssa *, int): Assertion `0 && "Narrowing during type inference"' failed.
Aborted (core dumped)
Reproduces in 8.3 too, MAY_BE_ARRAY_EMPTY is lost at some point.
EDIT: to me it seems that the MAY_BE_ARRAY_EMPTY removal can happen regardless of the key type being set or not, which solves this for me but perhaps I am overlooking something. (EDIT: I guess if it throws during execution then the addition of MAY_BE_ARRAY_EMPTY would've been wrong)
Reminds me, @YuanchengJiang you might want to consider compiling with -DZEND_VERIFY_TYPE_INFERENCE when running opcache without JIT. This might reveal some additional type inference bugs.
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
nightly
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered: