1 ";15 }16 }17 class myExtendObject extends myObject{18 public static $myStaticVar = 0;19 function myExtendMethod(){20 echo parent::$myStaticVar . "";21 echo self::$myStaticVar . "";22 }23 }24 $instance1 = new myObject();25 $instance1->myMethod();26 $instance2 = new myObject();27 $instance2->myMethod();28 $instance3 = new myExtendObject();29 $instance3->myExtendMethod();