class A { var $cont; } $A = new A(); $B = $A; $A->cont ="値を代入した"; print $A->cont; print $B->cont;
class A { var $cont; } $A = new A(); $B = &$A; $A->cont ="値を代入した"; print $A->cont; print $B->cont;
class A { function View() { print "class A"; } } class B extends A { function View() { print "Class B"; } function Option() { print "ClassBOption"; } } $A = new A(); $B = new B(); $A->View(); $B->View(); $A = $B; $A->View(); $A->Option();