[php-src] PR #26056: SCCP: keep runtime deprecations for ASSIGN_DIM with null key and false autoviv

From: Date: Fri, 04 Dec 2026 03:57:13 +0000
Subject: [php-src] PR #26056: SCCP: keep runtime deprecations for ASSIGN_DIM with null key and false autoviv
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-41402@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/26056 Author: fQwQf ## Description ct_eval_add_array_elem() handled a null key by silently inserting under the "" key, and ct_eval_assign_dim() handled a false array (op1) by silently autovivifying. Both emit deprecations at run-time which the compile-time replacement/DCE then suppressed - unlike the neighboring INIT_ARRAY/ADD_ARRAY_ELEMENT handling which already bails out with "Emits deprecation at run-time.", and unlike the IS_DOUBLE key case which uses zend_is_long_compatible() for the same reason. Make both cases return FAILURE so the result becomes unknown and the opcodes (with their diagnostics) stay alive: - ct_eval_add_array_elem(): case IS_NULL: return FAILURE; - ct_eval_assign_dim(): case IS_FALSE: return FAILURE; (IS_NULL op1 autovivification has no diagnostic and keeps working) ## Reproducer / Tests ext/opcache/tests/opt/sccp_assign_dim_null_key.phpt (added): with an error handler capturing diagnostics, interpreter output and opcache output are now identical - both deprecations are emitted with opcache enabled at the default optimization level (previously both disappeared; deterministic). Also verified against a 940-program differential corpus (no-opcache vs opcache at max level vs JIT): 0 differentials, 0 ASan reports.

« previous php.git-pulls (#41402) next »