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-- 16Deprecated: Function ReflectionParameter::export() is deprecated in %s on line %d 17 18Fatal error: Uncaught ReflectionException: The parameter specified by its name could not be found in %s:%d 19Stack trace: 20#0 [internal function]: ReflectionParameter->__construct('ReflectionParam...', 'incorrect_param...') 21#1 %s(%d): ReflectionParameter::export('ReflectionParam...', 'incorrect_param...') 22#2 {main} 23 thrown in %s on line %d 24