Arquivos
hhvm/hphp/test/vm/rename_dyn_function.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08:00

23 linhas
336 B
PHP

<?php
function a() {
echo "Hello from a\n";
}
function b() {
echo "I am b\n";
}
function callfns($name, $name2) {
echo "Calling $name\n";
$name();
echo "Calling $name2\n";
$name2();
}
callfns('a', 'b');
fb_rename_function('a', 'old_a');
fb_rename_function('b', 'a');
fb_rename_function('old_a', 'b');
callfns('a', 'b');