<?php class A{ public static $a=1; } class AA extends A{ public function test(){ self::$a = 3; echo self::$a; echo '------'; echo A::$a; } } $A = new AA(); $A->test();