1--TEST-- 2runkit7_function_rename() function corruption prevented when original method is replaced with a substitute. 3--SKIPIF-- 4<?php if (!extension_loaded("runkit7") || !RUNKIT7_FEATURE_MANIPULATION) print "skip"; ?> 5--FILE-- 6<?php 7 8function hi() { 9 echo "Hi"; 10} 11 12function make_object() { 13 return new stdClass(); 14} 15 16function fake_hi() { 17 $c = make_object(); 18 var_dump($c); 19} 20 21runkit7_function_rename('hi', 'hi5'); 22 23try { 24 hi(); 25} catch (Throwable $e) { 26 echo 'Caught ' . get_class($e) . ': ' . $e->getMessage(); 27} 28--EXPECTF-- 29Caught Error: Call to undefined function hi() 30