$child_instance = (childClass)$parent_instance;
$parent_instance = (parentClass)$child_instance;
Or is it possible?
$child_instance = (childClass)$parent_instance;
$parent_instance = (parentClass)$child_instance;
Or is it possible?
No. After you use new ClassA
you cannot change the type of class the class of that object.