1--TEST-- 2ReflectionParameter::export() with incorrect first parameter 3--CREDITS-- 4Stefan Koopmanschap <stefan@stefankoopmanschap.nl> 5--FILE-- 6<?php 7function ReflectionParameterTest($test, $test2 = null) { 8 echo $test; 9} 10$reflect = new ReflectionFunction('ReflectionParameterTest'); 11$params = $reflect->getParameters(); 12try { 13 foreach($params as $key => $value) { 14 ReflectionParameter::export($reflect, $key); 15 } 16} 17catch (ReflectionException $e) { 18 echo $e->getMessage() . "\n"; 19} 20try { 21 foreach($params as $key => $value) { 22 ReflectionParameter::export(42, $key); 23 } 24} 25catch (ReflectionException $e) { 26 echo $e->getMessage() . "\n"; 27} 28?> 29--EXPECTF-- 30Method ReflectionFunction::__invoke() does not exist 31The parameter class is expected to be either a string, an array(class, method) or a callable object 32