<?php class AnotherClass{public $name = 'hoh';public static function ff () {echo $this->name;} }class ClassName extends AnotherClass{public static function lol () { echo $this->name; }}$us = new ClassName();$us::lol();
Standard input is empty
Standard output is empty
PHP Fatal error: Uncaught Error: Using $this when not in object context in /home/zYuEEr/prog.php:14 Stack trace: #0 /home/zYuEEr/prog.php(19): ClassName::lol() #1 {main} thrown in /home/zYuEEr/prog.php on line 14
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!