1--TEST--
2ReflectionMethod::createFromMethodName()
3--FILE--
4<?php
5
6class Foo {
7    public function bar() {}
8}
9
10class MyReflectionMethod extends ReflectionMethod {}
11
12$m = MyReflectionMethod::createFromMethodName("Foo::bar");
13
14var_dump($m);
15
16try {
17    $m = MyReflectionMethod::createFromMethodName("Foo::baz");
18} catch (Exception $e) {
19    echo $e->getMessage() . "\n";
20}
21
22?>
23--EXPECTF--
24object(MyReflectionMethod)#%d (%d) {
25  ["name"]=>
26  string(3) "bar"
27  ["class"]=>
28  string(3) "Foo"
29}
30Method Foo::baz() does not exist
31