{ echo "{$var} Students"; } } // Student = new Student(); // echo $student->total_students; echo Student::$total_students . "<br/>"; echo Student::welcome_students() . "<br/>"; echo Student::welcome_students("Greetings") . "<br/>"; Student::$total_students = 1; echo Student::$total_students . "<br/>"; // static variables are shared throughout the inheritance tree class One { static $foo; } class Two extends One { } class Three extends Two { } One::$foo = 1; Two::$foo = 2; Three::$foo = 3; echo One::$foo; // 3 echo Two::$foo; //3 echo Three::$foo; //3