3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date1 = new DateTime('12-12-2013'); $date2 = new DateTime('now'); $number1 = (int)$date1->format('U'); $number2 = (int)$date2->format('U'); echo (($number2 - $number1)/60/60) * 24;
based on dfGP0
Output for 5.6.28, 7.0.14 - 7.1.0
180386.28
Output for 7.0.6
503075.67333333
Output for 7.0.5
485525.92
Output for 7.0.4
471980.73333333
Output for 7.0.3
476604.8
Output for 7.0.2
479052.13333333
Output for 7.0.1
479738.13333333
Output for 7.0.0
481502.98666667
Output for hhvm-3.12.0
473215.94
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.21
502387.35333333
Output for 5.6.20
489533.84
Output for 5.6.19
470447.58666667
Output for 5.6.18
474674.46
Output for 5.6.17
477282.17333333
Output for 5.6.16
482101.91333333
Output for 5.6.15
482700.00666667
Output for 5.6.14
485059.51333333
Output for 5.6.13
492641.34666667
Output for 5.6.12
495276.76666667
Output for 5.6.11
497173.54
Output for 5.6.10
498367.42
Output for 5.6.9
499639.04
Output for 5.6.8
500986.54
Output for 5.5.35
513998.5
Output for 5.5.34
490166.01333333
Output for 5.5.33
471094.37333333
Output for 5.5.32
475863.77333333
Output for 5.5.31
477924.21333333
Output for 5.5.30
484474.70666667
Output for 5.5.29
493556.27333333
Output for 5.5.28
495931.28
Output for 5.5.27
496562.37333333
Output for 5.5.26
499002.17333333
Output for 5.5.25
500307.96
Output for 5.5.24
514881.65333333
Output for 5.4.45
373590.27333333
Output for 5.4.44
373590.24
Output for 5.4.43
373590.20666667
Output for 5.4.42
330894.38666667
Output for 5.4.41
330894.37333333
Output for 5.4.39 - 5.4.40
330894.34666667
Output for 5.4.38
330894.33333333
Output for 5.4.36 - 5.4.37
330894.32
Output for 5.4.35
330894.31333333
Output for 5.4.17 - 5.4.34
180386.31333333
Output for 5.3.25 - 5.4.16
180386.32
Output for 5.3.4 - 5.3.24
180386.32666667
Output for 5.2.0 - 5.3.3
180386.33333333
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/lHmdU on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/lHmdU on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/lHmdU on line 3