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

24 lines (22 sloc) 0.477 kb
--TEST--
runkit_function_redefine() function
--SKIPIF--
<?php if(!extension_loaded("runkit") || !RUNKIT_FEATURE_MANIPULATION) print "skip"; ?>
--FILE--
<?php
$a = 'a';
function runkitSample($c) {
global $a;
echo "$a is $c\n";
}
$funcName = 'runkitSample';
runkitSample(1);
runkit_function_redefine($funcName,'$b','global $a; static $is="is"; for($i=0; $i<10; $i++) {} echo "$a $is $b\n";');
$a = 'b';
runkitSample(2);
echo $funcName
?>
--EXPECT--
a is 1
b is 2
runkitSample
Jump to Line
Something went wrong with that request. Please try again.