1--TEST-- 2ReflectionParameter::export() with incorrect second 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(); 12foreach($params as $key => $value) { 13 ReflectionParameter::export('ReflectionParameterTest', 'incorrect_parameter'); 14} 15--EXPECTF-- 16Fatal error: Uncaught ReflectionException: The parameter specified by its name could not be found in %s.php:%d 17Stack trace: 18#0 [internal function]: ReflectionParameter->__construct('ReflectionParam...', 'incorrect_param...') 19#1 %s.php(%d): ReflectionParameter::export('ReflectionParam...', 'incorrect_param...') 20#2 {main} 21 thrown in %s.php on line %d 22