3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class time{ public static $x; public function echoTime() { $this->x = time(); echo $this->x; } } class A { public static function test() { $time = new time(); $time->echoTime(); } } A::test(); sleep(2); A::test();
Output for 7.2.0
Notice: Accessing static property time::$x as non static in /in/IEqO0 on line 6 Notice: Accessing static property time::$x as non static in /in/IEqO0 on line 7 1446803894
Process exited with code 137.
Output for 7.0.0 - 7.1.10
Notice: Accessing static property time::$x as non static in /in/IEqO0 on line 6 Notice: Accessing static property time::$x as non static in /in/IEqO0 on line 7 1446803894 Notice: Accessing static property time::$x as non static in /in/IEqO0 on line 6 Notice: Accessing static property time::$x as non static in /in/IEqO0 on line 7 1446803896
Output for 5.5.0 - 5.6.28
Strict Standards: Accessing static property time::$x as non static in /in/IEqO0 on line 6 Strict Standards: Accessing static property time::$x as non static in /in/IEqO0 on line 7 14468038941446803896