Category
stdlib · php-src-strict
Problem
PHP 8.3+ str_increment() / str_decrement() must be absent from function_exists() and get_defined_functions()['internal'] on the default PHP 8.2 reference profile (Zend 8.2 in Docker). The VM advertises both on the 8.4.0-dev line via CompilerVersion::supportsStrIncrement() / advertisesBuiltinSince('8.3.0'), diverging from php-src-strict reference behavior (same class of bug fixed for zend_thread_id() in #11842).
| Repro |
Zend 8.2 (2026-07-05) |
VM (2026-07-05) |
function_exists('str_increment') |
false |
true |
in_array('str_increment', get_defined_functions()['internal']) |
false |
true |
Callable under forward profile (PHP_COMPILER_PROFILE=8.3 / stable 8.4+) is fine once advertisement matches Zend for that profile.
php-src reference
PHP implementation target
Repro
./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_str_increment_phantom_function_exists.php; echo exit:$?'
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_str_increment_phantom_function_exists.php; echo exit:$?'
Done when
Category
stdlib· php-src-strictProblem
PHP 8.3+
str_increment()/str_decrement()must be absent fromfunction_exists()andget_defined_functions()['internal']on the default PHP 8.2 reference profile (Zend 8.2 in Docker). The VM advertises both on the 8.4.0-dev line viaCompilerVersion::supportsStrIncrement()/advertisesBuiltinSince('8.3.0'), diverging from php-src-strict reference behavior (same class of bug fixed forzend_thread_id()in #11842).function_exists('str_increment')falsetruein_array('str_increment', get_defined_functions()['internal'])falsetrueCallable under forward profile (
PHP_COMPILER_PROFILE=8.3/ stable 8.4+) is fine once advertisement matches Zend for that profile.php-src reference
ext/standard/string.c—PHP_FUNCTION(str_increment),PHP_FUNCTION(str_decrement)(PHP 8.3)Zend/zend_API.c— conditional function registration by PHP versionPHP implementation target
lib/CompilerVersion.php— split callable gate (supportsStrIncrement()) from advertisement gate (advertisesStrIncrement()mirroringadvertisesMbStrPad()/ Stdlib: PHP 8.4 forward-profile gated builtins — function_exists/extension_loaded true on reference profile (ext/standard) #16086)ext/standard/Module.php+function_existslowering — register/c advertise only when profile ≥ 8.3.0 stable or explicit forward profilescript/capability-matrix.phpnotes if matrix rows changeRepro
Done when
okon VM with default/php-src reference profile (8.2)function_exists/get_defined_functionstrue whenPHP_COMPILER_PROFILE=8.3+or stable 8.4 runtimetest/compliance/cases/string/