Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 74f4b772aa
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (22 sloc) 0.684 kb
--TEST--
runkit_function_rename() function with reflection
--SKIPIF--
<?php if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip";
if(version_compare(PHP_VERSION, '5.0.0', '<')) print "skip";
?>
--FILE--
<?php
function runkitFunction($param) {
echo "Runkit function\n";
}
$reflFunc = new ReflectionFunction('runkitFunction');
runkit_function_rename('runkitFunction', 'newFunction');
var_dump($reflFunc);
$reflFunc->invoke();
?>
--EXPECTF--
object(ReflectionFunction)#%d (1) {
["name"]=>
string(30) "__function_removed_by_runkit__"
}
Fatal error: __function_removed_by_runkit__(): A function removed by runkit was somehow invoked in %s on line %d
Jump to Line
Something went wrong with that request. Please try again.