Category
bug · php-src-strict · stdlib · reflection · VERSION_ID / profile gate (pillar 4)
Problem
Several ReflectionProperty methods diverge from Zend/php-src:
getRawValue / setRawValue — PHP 8.4 APIs (property hooks bypass). VM advertises them under default / PROFILE=8.2 where Zend 8.2 has neither. Prior closed add: Stdlib: ReflectionProperty::setRawValue()/getRawValue() — bypass hooks for init (PHP 8.4, ext/reflection/php_reflection.c) #6451 .
getMangledName — not a php-src ReflectionProperty method on any current branch; VM invents it and returns the short name.
isDefaultValueAvailable — php-src puts this on ReflectionParameter , not ReflectionProperty (property side uses hasDefaultValue()). Prior related: Stdlib: ReflectionProperty::hasDefaultValue() / isDefaultValueAvailable() missing (ext/reflection/php_reflection.c) #11442 (hasDefaultValue). VM advertises the parameter API name on properties.
Verified 2026-07-23 (Zend 8.2.32 vs VM):
Repro
Zend 8.2
VM (default / 8.2 / 8.4)
method_exists(…, 'getRawValue')
0
1
method_exists(…, 'setRawValue')
0
1
method_exists(…, 'getMangledName')
0
1
method_exists(…, 'isDefaultValueAvailable')
0
1
method_exists(…, 'hasDefaultValue')
1
1 (ok)
On PROFILE=8.4, getRawValue/setRawValue may remain (php-src 8.4+); getMangledName and isDefaultValueAvailable must stay absent.
php-src reference
PHP implementation target
ext/reflection/ method table — remove getMangledName / isDefaultValueAvailable always; gate getRawValue/setRawValue on 8.4 profile
Prefer PHP-in-PHP; no new runtime/*.c
Repro
./script/docker-exec.sh -- bash -lc ' PHP_COMPILER_PROFILE=8.2 php bin/vm.php test/repro/reflectionproperty_phantoms.php'
# compare: php test/repro/reflectionproperty_phantoms.php
Done when
Category
bug· php-src-strict · stdlib · reflection · VERSION_ID / profile gate (pillar 4)Problem
Several
ReflectionPropertymethods diverge from Zend/php-src:getRawValue/setRawValue— PHP 8.4 APIs (property hooks bypass). VM advertises them under default /PROFILE=8.2where Zend 8.2 has neither. Prior closed add: Stdlib: ReflectionProperty::setRawValue()/getRawValue() — bypass hooks for init (PHP 8.4, ext/reflection/php_reflection.c) #6451.getMangledName— not a php-srcReflectionPropertymethod on any current branch; VM invents it and returns the short name.isDefaultValueAvailable— php-src puts this onReflectionParameter, notReflectionProperty(property side useshasDefaultValue()). Prior related: Stdlib: ReflectionProperty::hasDefaultValue() / isDefaultValueAvailable() missing (ext/reflection/php_reflection.c) #11442 (hasDefaultValue). VM advertises the parameter API name on properties.Verified 2026-07-23 (Zend 8.2.32 vs VM):
method_exists(…, 'getRawValue')01method_exists(…, 'setRawValue')01method_exists(…, 'getMangledName')01method_exists(…, 'isDefaultValueAvailable')01method_exists(…, 'hasDefaultValue')11(ok)On
PROFILE=8.4,getRawValue/setRawValuemay remain (php-src 8.4+);getMangledNameandisDefaultValueAvailablemust stay absent.php-src reference
ext/reflection/php_reflection.stub.php— ReflectionProperty / ReflectionParameter method listsext/reflection/php_reflection.c— raw value handlers (8.4+)PHP implementation target
ext/reflection/method table — removegetMangledName/isDefaultValueAvailablealways; gategetRawValue/setRawValueon 8.4 profileruntime/*.cRepro
Done when
PROFILE=8.2:getRawValue/setRawValue/getMangledName/isDefaultValueAvailableallmethod_existsfalsegetMangledNameandisDefaultValueAvailableremain undefined onReflectionPropertyPROFILE=8.4:getRawValue/setRawValuematch php-src 8.4;hasDefaultValueunchanged