1--TEST--
2Reflection on closures: Segfaults with getParameters() and getDeclaringFunction()
3--FILE--
4<?php
5
6$closure = function($a, $b = 0) { };
7
8$method = new ReflectionFunction ($closure);
9$params = $method->getParameters ();
10unset ($method);
11$method = $params[0]->getDeclaringFunction ();
12unset ($params);
13echo $method->getName ()."\n";
14
15$parameter = new ReflectionParameter ($closure, 'b');
16$method = $parameter->getDeclaringFunction ();
17unset ($parameter);
18echo $method->getName ()."\n";
19
20?>
21===DONE===
22--EXPECTF--
23{closure}
24{closure}
25===DONE===
26