3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); $now = new Datetime(); for ($i = 0; $i < 4; $i++) { $a = $now->diff($now); } $t = 100/5.5; var_dump($t); // first running: float(18.181818181818) // after update page: Warning: Division by zero in G:\www\test.php on line 10 bool(false) ?>
Output for 7.0.0 - 7.1.0
float(18.181818181818) Fatal error: Uncaught Error: Call to undefined function bool() in /in/DVe16:17 Stack trace: #0 {main} thrown in /in/DVe16 on line 17
Process exited with code 255.
Output for hhvm-3.12.0
float(18.181818181818) Fatal error: Uncaught Error: Call to undefined function bool() in /in/DVe16:17 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.3.0 - 5.6.28, hhvm-3.10.0
float(18.181818181818) Fatal error: Call to undefined function bool() in /in/DVe16 on line 17
Process exited with code 255.
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::diff() in /in/DVe16 on line 8
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'Datetime' not found in /in/DVe16 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/DVe16 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/DVe16 on line 4