php-8.0.30-src/ext/reflection/tests/ReflectionParameter_ctor_ca...

19 lines
355 B
PHP

--TEST--
Test method name string cast in ReflectionParameter ctor
--FILE--
<?php
class A {}
try {
new ReflectionParameter([
A::class,
new class { public function __toString() { return 'method'; } }
], 'param');
} catch (ReflectionException $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Method A::method() does not exist