3v4l.org

run code in 300+ PHP versions simultaneously
<?php $to_date = time("2014-01-02"); // Input your date here e.g. strtotime("2014-01-02") $from_date = strtotime("2012-01-31"); $day_diff = $to_date - $from_date; echo floor($day_diff/(60*60*24)); - See more at: http://www.w3resource.com/php-exercises/php-date-exercises.php#sthash.r2qN7FpE.dpuf

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.290.0050.04912.48
5.4.280.0130.06812.38
5.4.270.0080.03812.38
5.4.260.0120.04112.38
5.4.250.0100.05712.38
5.4.240.0100.05612.38
5.4.230.0200.05612.37
5.4.220.0050.04312.37
5.4.210.0070.04112.37
5.4.200.0120.04112.37
5.4.190.0080.04312.37
5.4.180.0050.04312.37
5.4.170.0070.03812.38
5.4.160.0090.04112.37
5.4.150.0060.04912.37
5.4.140.0090.05812.06
5.4.130.0090.04112.04
5.4.120.0090.04312.01
5.4.110.0100.04212.00
5.4.100.0070.03912.00
5.4.90.0090.04712.00
5.4.80.0100.04112.00
5.4.70.0050.03812.00
5.4.60.0120.04112.00
5.4.50.0070.04012.00
5.4.40.0070.03811.99
5.4.30.0060.03811.98
5.4.20.0070.04211.98
5.4.10.0080.05411.98
5.4.00.0060.05011.48
5.3.280.0090.04112.71
5.3.270.0130.06112.72
5.3.260.0120.04612.72
5.3.250.0090.04312.72
5.3.240.0080.04212.72
5.3.230.0060.03912.71
5.3.220.0080.04312.68
5.3.210.0090.04112.68
5.3.200.0060.03912.68
5.3.190.0070.04112.68
5.3.180.0070.03612.67
5.3.170.0070.03712.67
5.3.160.0070.04012.67
5.3.150.0080.04212.67
5.3.140.0070.04512.66
5.3.130.0080.05212.66
5.3.120.0070.04512.66
5.3.110.0070.04212.65
5.3.100.0060.03812.12
5.3.90.0090.04012.08
5.3.80.0090.04512.08
5.3.70.0090.04512.08
5.3.60.0100.03512.06
5.3.50.0100.03812.00
5.3.40.0090.03912.01
5.3.30.0080.03811.95
5.3.20.0070.03811.73
5.3.10.0090.03611.70
5.3.00.0100.03511.69
5.2.170.0040.0409.19
5.2.160.0070.0349.19
5.2.150.0070.0389.19
5.2.140.0070.0349.18
5.2.130.0050.0309.14
5.2.120.0070.0389.14
5.2.110.0050.0349.15
5.2.100.0070.0309.14
5.2.90.0110.0429.14
5.2.80.0100.0439.14
5.2.70.0120.0569.13
5.2.60.0130.0419.09
5.2.50.0070.0439.06
5.2.40.0090.0349.04
5.2.30.0200.0519.01
5.2.20.0040.0309.00
5.2.10.0060.0298.92
5.2.00.0040.0388.79
5.1.60.0070.0248.07
5.1.50.0070.0258.07
5.1.40.0040.0258.05
5.1.30.0050.0278.40
5.1.20.0060.0288.42
5.1.10.0040.0278.14
5.1.00.0050.0268.14
5.0.50.0050.0236.63
5.0.40.0090.0236.48
5.0.30.0040.0346.30
5.0.20.0040.0236.26
5.0.10.0050.0276.24
5.0.00.0050.0366.23
4.4.90.0040.0184.78
4.4.80.0050.0204.76
4.4.70.0050.0204.76
4.4.60.0040.0154.75
4.4.50.0040.0204.77
4.4.40.0070.0274.71
4.4.30.0080.0214.76
4.4.20.0040.0224.84
4.4.10.0050.0184.85
4.4.00.0050.0284.76
4.3.110.0050.0194.67
4.3.100.0040.0174.67
4.3.90.0040.0194.63
4.3.80.0040.0344.58
4.3.70.0080.0164.63
4.3.60.0040.0184.63
4.3.50.0040.0194.63
4.3.40.0040.0424.54
4.3.30.0030.0203.29
4.3.20.0050.0193.26
4.3.10.0020.0203.23
4.3.00.0000.0337.24

preferences:
140.06 ms | 1394 KiB | 7 Q