1--TEST-- 2Fetching default value of an internal trampoline function with userland arginfo 3--FILE-- 4<?php 5$closure = function ($b = 0) {}; 6$ro = new ReflectionObject($closure); 7$rm = $ro->getMethod('__invoke'); 8echo $rm, "\n"; 9 10$rp = $rm->getParameters()[0]; 11var_dump($rp->isDefaultValueAvailable()); 12try { 13 var_dump($rp->getDefaultValue()); 14} catch (ReflectionException $e) { 15 echo $e->getMessage(), "\n"; 16} 17?> 18--EXPECT-- 19Method [ <internal> public method __invoke ] { 20 21 - Parameters [1] { 22 Parameter #0 [ <optional> $b = <default> ] 23 } 24} 25 26bool(false) 27Internal error: Failed to retrieve the default value 28