3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class bbq { static $soda; static function printSoda(){ echo $this->soda; } } bbq::$soda = 8675309; bbq::printSoda();
based on rSGR4
Output for 7.0.0 - 7.1.7, 7.2.0
Fatal error: Uncaught Error: Using $this when not in object context in /in/J1Upi:7 Stack trace: #0 /in/J1Upi(12): bbq::printSoda() #1 {main} thrown in /in/J1Upi on line 7
Process exited with code 255.
Output for 7.1.10

Process exited with code 137.
Output for 5.3.20 - 5.6.28
Fatal error: Using $this when not in object context in /in/J1Upi on line 7
Process exited with code 255.