Category
bug · php-src-strict · named arguments / Reflection
Problem
Type/introspection builtins reject Zend stub named $value. Reflection is empty (get_debug_type, sizeof, several is_*) or uses InternalArgInfo var (count, is_string, is_array, …). Probed 2026-07-26 vs host Zend 8.2.32.
| Repro |
Zend 8.2 |
VM (2026-07-26) |
get_debug_type Reflection |
value |
(empty) |
count / sizeof Reflection |
value,mode |
var,mode / (empty) |
is_string / is_array Reflection |
value |
var |
get_debug_type(value: 1) |
"int" |
Unknown named parameter $value |
count(value: [1]) |
1 |
Unknown named parameter $value |
is_string(value: "a") |
true |
Unknown named parameter $value |
Same $value gap for is_bool, is_int, is_float, is_null, is_object, is_resource, and empty Reflection for is_countable / is_iterable / is_integer / is_long / is_double.
php-src reference
PHP implementation target
lib/BuiltinParamNames.php — get_debug_type → ['value']; count/sizeof → ['value','mode']; is_* → ['value'] (and is_finite/is_infinite/is_nan → ['num'])
- Reflection + named-arg dispatch; PHP-in-PHP only; no new C
Repro
./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r '\''try { echo get_debug_type(value:1), "\n"; } catch (Throwable $e) { echo $e->getMessage(), "\n"; } try { echo count(value:[1]), "\n"; } catch (Throwable $e) { echo $e->getMessage(), "\n"; }'\'''
Done when
Category
bug· php-src-strict · named arguments / ReflectionProblem
Type/introspection builtins reject Zend stub named
$value. Reflection is empty (get_debug_type,sizeof, severalis_*) or uses InternalArgInfovar(count,is_string,is_array, …). Probed 2026-07-26 vs host Zend 8.2.32.get_debug_typeReflectionvaluecount/sizeofReflectionvalue,modevar,mode/ (empty)is_string/is_arrayReflectionvaluevarget_debug_type(value: 1)"int"Unknown named parameter $valuecount(value: [1])1Unknown named parameter $valueis_string(value: "a")trueUnknown named parameter $valueSame
$valuegap foris_bool,is_int,is_float,is_null,is_object,is_resource, and empty Reflection foris_countable/is_iterable/is_integer/is_long/is_double.php-src reference
ext/standard/basic_functions.stub.php—function get_debug_type(mixed $value): stringZend/zend_builtin_functions.stub.php—count/sizeof/is_string($value)PHP implementation target
lib/BuiltinParamNames.php—get_debug_type→['value'];count/sizeof→['value','mode'];is_*→['value'](andis_finite/is_infinite/is_nan→['num'])Repro
Done when
.phpt+test/repro/issue_NNNN_*.php