(PECL runkit >= 0.7.0)
runkit_class_emancipate — تبدیل کلاس ارث برده به کلاس پایه حذف هر گونه متد که حوزه آن ارثی است.
نام کلاس برای emancipate
Returns TRUE on success or FALSE on failure.
Example #1 مثال runkit_class_emancipate()
<?php
class myParent {
function parentFunc () {
echo "Parent Function Output\n";
}
}
class myChild extends myParent {
}
myChild::parentFunc();
runkit_class_emancipate('myChild');
myChild::parentFunc();
?>
The above example will output:
Parent Function Output Fatal error: Call to undefined function: parentFunc() in example.php on line 12