3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class trial{ public $id; public static $sid; public function show(){ if (trial::$sid) echo trial::$sid; else echo $this->id; } } $obj = new trial(); $obj->id = 1; $obj->show(); echo "\n\n"; trial::$sid = 5; echo trial::show();
based on LXdls
Output for 7.0.0 - 7.2.0
1 Deprecated: Non-static method trial::show() should not be called statically in /in/SS9K5 on line 20 5
Output for 5.3.18 - 5.6.28
1 Strict Standards: Non-static method trial::show() should not be called statically in /in/SS9K5 on line 20 5