runkit_class_emancipate
(PECL runkit:0.7-0.9)
runkit_class_emancipate — Convert an inherited class to a base class, removes any method whose scope is ancestral
LeÃrás
bool runkit_class_emancipate
( string $classname
)
Paraméterek
- classname
-
Name of class to emancipate
Visszatérési értékek
Siker esetén TRUE értékkel tér vissza, ellenkező esetben FALSE értéket ad.
Példák
Example#1 A runkit_class_emancipate() example
<?php
class myParent {
function parentFunc () {
echo "Parent Function Output\n";
}
}
class myChild extends myParent {
}
myChild::parentFunc();
runkit_class_emancipate('myChild');
myChild::parentFunc();
?>
A fenti példa a következő kimenetet adja:
Parent Function Output Fatal error: Call to undefined function: parentFunc() in example.php on line 12