summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/ReflectionParameter_ctor_cast.phpt
blob: 10f45647e6cb9ad552c6ff4bfff31dd3db4b693c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--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