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();
based on V2Ls4
Output for 7.0.0 - 7.2.0
Notice: Accessing static property time::$x as non static in /in/9qht8 on line 5 Notice: Accessing static property time::$x as non static in /in/9qht8 on line 6 1446803829 Notice: Accessing static property time::$x as non static in /in/9qht8 on line 5 Notice: Accessing static property time::$x as non static in /in/9qht8 on line 6 1446803831
Output for 5.5.0 - 5.6.28
Strict Standards: Accessing static property time::$x as non static in /in/9qht8 on line 5 Strict Standards: Accessing static property time::$x as non static in /in/9qht8 on line 6 14468038291446803831