1--TEST--
2Reflection on invokable objects
3--FILE--
4<?php
5
6class Test {
7	function __invoke($a, $b = 0) { }
8}
9
10$rm = new ReflectionMethod(new Test, '__invoke');
11var_dump($rm->getName());
12var_dump($rm->getNumberOfParameters());
13var_dump($rm->getNumberOfRequiredParameters());
14
15$rp = new ReflectionParameter(array(new Test, '__invoke'), 0);
16var_dump($rp->isOptional());
17
18$rp = new ReflectionParameter(array(new Test, '__invoke'), 1);
19var_dump($rp->isOptional());
20
21?>
22===DONE===
23--EXPECTF--
24string(8) "__invoke"
25int(2)
26int(1)
27bool(false)
28bool(true)
29===DONE===
30