1--TEST--
2Test method name string cast in ReflectionParameter ctor
3--FILE--
4<?php
5
6class A {}
7try {
8    new ReflectionParameter([
9        A::class,
10        new class { public function __toString() { return 'method'; } }
11    ], 'param');
12} catch (ReflectionException $e) {
13    echo $e->getMessage(), "\n";
14}
15
16?>
17--EXPECT--
18Method A::method() does not exist
19