runkit_class_emancipate
(PECL)
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
Példa 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 |
|