After #22681 I looked into exception messages:
Reflection*::getAttributes() with ReflectionAttribute::IS_INSTANCEOF
<?phpclass Demo {}
$r = newReflectionClass(Demo::class);
$r->getAttributes("foo\0bar", ReflectionAttribute::IS_INSTANCEOF);ReflectionFunction::__construct()
<?phpnewReflectionFunction("foo\0bar");ReflectionParameter::__construct() with string function
<?phpnewReflectionParameter("foo\0bar", 0);ReflectionParameter::__construct() with array with class name
<?phpnewReflectionParameter(["foo\0bar", ""], 0);
ReflectionParameter::__construct() with array with method name
<?phpclass Demo {}
newReflectionParameter([Demo::class, "foo\0bar"], 0);ReflectionMethod::__construct() with class name
<?phpnewReflectionMethod("foo\0bar", "");ReflectionMethod::__construct() with method name
<?phpclass Demo {}
newReflectionMethod(Demo::class, "foo\0bar");the above should also apply to ReflectionMethod::createFromMethodName() - they share the same lookup code
ReflectionClassConstant::__construct() with class name
<?phpnewReflectionClassConstant("foo\0bar", "");ReflectionClassConstant::__construct() with constant name
<?phpclass Demo {}
newReflectionClassConstant(Demo::class, "foo\0bar");ReflectionClass::__construct()
<?phpnewReflectionClass("foo\0bar");ReflectionClass::getStaticPropertyValue()
<?phpclass Demo {}
$r = newReflectionClass(Demo::class);
$r->getStaticPropertyValue("foo\0bar");ReflectionClass::setStaticPropertyValue()
<?phpclass Demo {}
$r = newReflectionClass(Demo::class);
$r->setStaticPropertyValue("foo\0bar", 123);ReflectionClass::getMethod()
<?phpclass Demo {}
$r = newReflectionClass(Demo::class);
$r->getMethod("foo\0bar");ReflectionClass::getProperty()
<?phpclass Demo {}
$r = newReflectionClass(Demo::class);
$r->getProperty("foo\0bar");ReflectionClass::getProperty() (fully qualified)
<?phpclass Base {}
class Demo {}
$r = newReflectionClass(Demo::class);
$r->getProperty("Base::foo\0bar");ReflectionClass::isSubclassOf()
<?phpclass Demo {}
$r = newReflectionClass(Demo::class);
$r->isSubclassOf("foo\0bar");ReflectionClass::implementsInterface()
<?phpclass Demo {}
$r = newReflectionClass(Demo::class);
$r->implementsInterface("foo\0bar");ReflectionProperty::__construct() with class name
<?phpnewReflectionProperty("foo\0bar", "");ReflectionProperty::__construct() with property name
<?phpclass Demo {}
newReflectionProperty(Demo::class, "foo\0bar");ReflectionProperty::skipLazyInitialization() with property name
<?php$o = (object)["foo\0bar" => "baz"];
$r = newReflectionProperty($o, "foo\0bar");
$r->skipLazyInitialization($o);
also affects anything else using reflection_property_check_lazy_compatible()
ReflectionEnum::getCase() with missing case
<?phpenum Demo {}
$r = newReflectionEnum(Demo::class);
$r->getCase("foo\0bar");ReflectionConstant::__construct()
<?phpnewReflectionConstant("foo\0bar");
After #22681 I looked into exception messages:
Reflection*::getAttributes() with ReflectionAttribute::IS_INSTANCEOF
ReflectionFunction::__construct()
ReflectionParameter::__construct() with string function
ReflectionParameter::__construct() with array with class name
ReflectionParameter::__construct() with array with method name
ReflectionMethod::__construct() with class name
ReflectionMethod::__construct() with method name
the above should also apply to ReflectionMethod::createFromMethodName() - they share the same lookup code
ReflectionClassConstant::__construct() with class name
ReflectionClassConstant::__construct() with constant name
ReflectionClass::__construct()
ReflectionClass::getStaticPropertyValue()
ReflectionClass::setStaticPropertyValue()
ReflectionClass::getMethod()
ReflectionClass::getProperty()
ReflectionClass::getProperty() (fully qualified)
ReflectionClass::isSubclassOf()
ReflectionClass::implementsInterface()
ReflectionProperty::__construct() with class name
ReflectionProperty::__construct() with property name
ReflectionProperty::skipLazyInitialization() with property name
also affects anything else using
reflection_property_check_lazy_compatible()ReflectionEnum::getCase() with missing case
ReflectionConstant::__construct()