3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $birth = new DateTime('1986-08-13 00:00:00'); $now = new DateTime(); echo $birth->diff($now)->days;
based on kCOUe
Output for 5.3.0 - 5.4.34, 5.6.28, 7.0.14 - 7.1.0
10299
Output for 7.0.6
10856
Output for 5.6.14, 7.0.5
10825
Output for 7.0.4
10802
Output for 7.0.3
10810
Output for 7.0.2
10814
Output for 7.0.1
10815
Output for 7.0.0
10818
Output for hhvm-3.12.0
10804
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.21
10855
Output for 5.6.20
10832
Output for 5.6.19
10799
Output for 5.6.18
10807
Output for 5.6.17
10811
Output for 5.6.16
10820
Output for 5.6.15
10821
Output for 5.6.13
10838
Output for 5.6.12
10842
Output for 5.6.11
10846
Output for 5.6.10
10848
Output for 5.6.9
10850
Output for 5.6.8
10852
Output for 5.5.35
10875
Output for 5.5.34
10834
Output for 5.5.33
10800
Output for 5.5.32
10809
Output for 5.5.31
10812
Output for 5.5.30
10824
Output for 5.5.29
10839
Output for 5.5.28
10844
Output for 5.5.27
10845
Output for 5.5.26
10849
Output for 5.5.25
10851
Output for 5.5.24
10876
Output for 5.4.43 - 5.4.45
10616
Output for 5.4.35 - 5.4.42
10557
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::diff() in /in/MTn0X on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/MTn0X on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/MTn0X on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/MTn0X on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/MTn0X on line 4
Process exited with code 255.