3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date1 = new DateTime('12-12-2014'); $date1->modify("10-12-2014"); $date2 = new DateTime('now'); $number1 = (int)$date1->format('U'); $number2 = (int)$date2->format('U'); echo (($number2 - $number1)/60/60) * 24;
based on U2ttF
Output for 5.6.28, 7.0.14 - 7.1.0
-28704.993333333
Output for 7.0.6
293987.64
Output for 7.0.5
276437.89333333
Output for 7.0.4
262892.70666667
Output for 7.0.3
267516.76666667
Output for 7.0.2
269964.10666667
Output for 7.0.1
270650.10666667
Output for 7.0.0
272414.96
Output for hhvm-3.12.0
264127.88666667
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.21
293299.31333333
Output for 5.6.20
280445.81333333
Output for 5.6.19
261359.56666667
Output for 5.6.18
265586.43333333
Output for 5.6.17
268194.14666667
Output for 5.6.16
273013.88
Output for 5.6.15
273611.98
Output for 5.6.14
275971.49333333
Output for 5.6.13
283553.32666667
Output for 5.6.12
286188.73333333
Output for 5.6.11
288085.44666667
Output for 5.6.10
289279.38666667
Output for 5.6.9
290551.00666667
Output for 5.6.8
291898.50666667
Output for 5.5.35
304910.46
Output for 5.5.34
281077.98666667
Output for 5.5.33
262006.34666667
Output for 5.5.32
266775.74666667
Output for 5.5.31
268836.18666667
Output for 5.5.30
275386.68
Output for 5.5.29
284468.24
Output for 5.5.28
286843.24666667
Output for 5.5.27
287474.33333333
Output for 5.5.26
289914.14
Output for 5.5.25
291219.92666667
Output for 5.5.24
306211.64
Output for 5.4.45
164502.24666667
Output for 5.4.44
164502.21333333
Output for 5.4.43
164502.17333333
Output for 5.4.42
121806.48666667
Output for 5.4.41
121806.47333333
Output for 5.4.39 - 5.4.40
121806.44666667
Output for 5.4.38
121806.43333333
Output for 5.4.36 - 5.4.37
121806.42
Output for 5.4.35
121806.41333333
Output for 5.4.29 - 5.4.34
-28704.966666667
Output for 5.4.7 - 5.4.28
-28704.96
Output for 5.3.15 - 5.4.6
-28704.953333333
Output for 5.3.6 - 5.3.14
-28704.946666667
Output for 5.2.10 - 5.3.5
-29856.946666667
Output for 5.2.0 - 5.2.9
-29856.94
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/jCV80 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/jCV80 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/jCV80 on line 3