3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sdate = "2014-01-02"; $edate = "2013-01-02"; $t=strtotime($edate); $t1=strtotime($sdate); print "$t"; print "$t1"; /*$date_diff = abs(strtotime($edate) - strtotime($sdate)); print "$date_diff"; $years = floor($date_diff / (365*60*60*24)); $months = floor(($date_diff - $years * 365*60*60*24) / (30*60*60*24)); $days = floor(($date_diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); printf("%d years, %d months, %d days", $years, $months, $days);*/ ?> - See more at: http://www.w3resource.com/php-exercises/php-date-exercises.php#sthash.xJA52BEw.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)
8.3.60.0040.01118.43
8.3.50.0100.01022.06
8.3.40.0100.00719.09
8.3.30.0140.00018.96
8.3.20.0080.00020.04
8.3.10.0000.00820.71
8.3.00.0080.00019.55
8.2.180.0110.00316.50
8.2.170.0120.00922.96
8.2.160.0130.00020.37
8.2.150.0000.00724.18
8.2.140.0090.00024.66
8.2.130.0050.00326.16
8.2.120.0000.00722.23
8.2.110.0060.00320.77
8.2.100.0040.00818.03
8.2.90.0050.00319.35
8.2.80.0050.00317.97
8.2.70.0000.00817.75
8.2.60.0000.00818.04
8.2.50.0080.00018.10
8.2.40.0040.00718.28
8.2.30.0030.00619.23
8.2.20.0030.00617.74
8.2.10.0080.00018.01
8.2.00.0030.00617.86
8.1.280.0140.00725.92
8.1.270.0040.00422.24
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0060.00322.70
8.1.230.0070.00417.77
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0040.00417.35
8.1.180.0070.00018.10
8.1.170.0080.00018.46
8.1.160.0070.00021.85
8.1.150.0050.00318.94
8.1.140.0000.00717.56
8.1.130.0040.00417.62
8.1.120.0000.00717.63
8.1.110.0050.00317.58
8.1.100.0000.00717.48
8.1.90.0070.00017.56
8.1.80.0040.00417.47
8.1.70.0030.00317.59
8.1.60.0060.00317.58
8.1.50.0000.00717.53
8.1.40.0040.00417.66
8.1.30.0000.00817.80
8.1.20.0000.00717.69
8.1.10.0040.00417.66
8.1.00.0070.00417.60
8.0.300.0050.00320.05
8.0.290.0000.00716.75
8.0.280.0030.00318.50
8.0.270.0050.00217.19
8.0.260.0030.00316.85
8.0.250.0030.00317.05
8.0.240.0030.00317.23
8.0.230.0030.00317.06
8.0.220.0000.00716.99
8.0.210.0000.00717.06
8.0.200.0040.00417.09
8.0.190.0030.00617.05
8.0.180.0040.00417.07
8.0.170.0030.00317.07
8.0.160.0050.00317.05
8.0.150.0040.00417.02
8.0.140.0030.00516.90
8.0.130.0000.00513.36
8.0.120.0050.00316.88
8.0.110.0030.00617.02
8.0.100.0070.00017.05
8.0.90.0050.00217.05
8.0.80.0000.01717.00
8.0.70.0000.00717.05
8.0.60.0040.00416.89
8.0.50.0050.00217.05
8.0.30.0160.00317.43
8.0.20.0100.01017.40
8.0.10.0030.00517.17
8.0.00.0080.01016.82
7.4.330.0000.00615.19
7.4.320.0070.00016.69
7.4.300.0030.00316.71
7.4.290.0030.00316.63
7.4.280.0080.00016.67
7.4.270.0000.00816.71
7.4.260.0000.00716.61
7.4.250.0070.00016.54
7.4.240.0030.00316.65
7.4.230.0030.00316.82
7.4.220.0160.00616.82
7.4.210.0080.00516.79
7.4.200.0060.00316.67
7.4.160.0170.00016.71
7.4.150.0070.01017.40
7.4.140.0080.01017.86
7.4.130.0110.00516.72
7.4.120.0140.00716.57
7.4.110.0110.00616.61
7.4.100.0150.00916.62
7.4.90.0110.00616.64
7.4.80.0060.01316.64
7.4.70.0030.01316.43
7.4.60.0100.00716.67
7.4.50.0000.00816.47
7.4.40.0070.01016.54
7.4.30.0130.00616.81
7.4.00.0060.00614.82
7.3.330.0030.00213.27
7.3.320.0000.00513.24
7.3.310.0030.00316.31
7.3.300.0070.00016.32
7.3.290.0030.01016.37
7.3.280.0060.01016.37
7.3.270.0080.01117.40
7.3.260.0090.00916.35
7.3.250.0080.01216.42
7.3.240.0060.01416.46
7.3.230.0040.01416.54
7.3.210.0060.01616.65
7.3.200.0140.00419.39
7.3.190.0190.00316.45
7.3.180.0100.00516.61
7.3.170.0070.01016.49
7.3.160.0060.00916.47
7.2.330.0100.00716.69
7.2.320.0060.01616.63
7.2.310.0090.01216.56
7.2.300.0100.00616.47
7.2.290.0030.01316.83
7.2.60.0060.00916.96
7.2.00.0100.00319.48
7.1.200.0090.00315.89
7.1.100.0000.01318.33
7.1.70.0000.00817.28
7.1.60.0090.01519.32
7.1.50.0080.01517.23
7.1.00.0000.08022.58
7.0.200.0050.00516.95
7.0.140.0130.06321.95
7.0.110.0030.03320.04
7.0.100.0100.03019.97
7.0.90.0270.04019.86
7.0.80.0100.08019.91
7.0.70.0070.04019.84
7.0.60.0030.07719.94
7.0.50.0100.06019.86
7.0.40.0070.08019.71
7.0.30.0130.07319.78
7.0.20.0200.08019.63
7.0.10.0100.08019.71
7.0.00.0100.06719.78
5.6.280.0070.07020.89
5.6.260.0000.03720.68
5.6.250.0070.06720.69
5.6.240.0070.07320.64
5.6.230.0030.03720.85
5.6.220.0030.03720.61
5.6.210.0070.03720.57
5.6.200.0070.08020.65
5.6.190.0030.04020.84
5.6.180.0070.07020.55
5.6.170.0070.03320.58
5.6.160.0000.08720.46
5.6.150.0030.05720.81
5.6.140.0030.06020.45
5.6.130.0030.04720.67
5.6.120.0030.04320.68
5.6.110.0070.05020.64
5.6.100.0100.07020.54
5.6.90.0100.06720.53
5.6.80.0170.06719.99
5.6.70.0070.04319.95
5.6.60.0030.08019.96
5.6.50.0030.06319.84
5.6.40.0130.07319.87
5.6.30.0070.08319.89
5.6.20.0070.08019.93
5.6.10.0030.06320.00
5.6.00.0130.06720.05
5.5.380.0070.07017.44
5.5.370.0070.07017.61
5.5.360.0030.06017.43
5.5.350.0030.08017.56
5.5.340.0030.04018.16
5.5.330.0030.08018.03
5.5.320.0030.08318.02
5.5.310.0130.03718.02
5.5.300.0000.04018.11
5.5.290.0100.06718.02
5.5.280.0070.06317.76
5.5.270.0030.08717.85
5.5.260.0100.06317.88
5.5.250.0000.04317.94
5.5.240.0030.05717.39
5.5.230.0130.06317.26
5.5.220.0030.08017.51
5.5.210.0030.07717.51
5.5.200.0130.06717.25
5.5.190.0070.06017.38
5.5.180.0130.07317.48
5.5.160.0100.04017.60
5.5.150.0070.06317.50
5.5.140.0130.05717.47
5.5.130.0030.08017.44
5.5.120.0130.06317.44
5.5.110.0070.07717.23
5.5.100.0030.07717.35
5.5.90.0070.06017.11
5.5.80.0100.05317.14
5.5.70.0030.07717.26
5.5.60.0030.06317.13
5.5.50.0130.02717.10
5.5.40.0000.05017.39
5.5.30.0130.04317.36
5.5.20.0030.04717.10
5.5.10.0030.04317.26
5.5.00.0100.03317.39
5.4.450.0070.03719.36
5.4.440.0070.03319.40
5.4.430.0030.07019.33
5.4.420.0030.08319.35
5.4.410.0030.04019.47
5.4.400.0030.05319.08
5.4.390.0100.07319.01
5.4.380.0070.05718.98
5.4.370.0100.06319.25
5.4.360.0130.05719.12
5.4.350.0070.07019.00
5.4.340.0130.07319.18
5.4.320.0070.07719.25
5.4.310.0070.07319.14
5.4.300.0100.04018.93
5.4.290.0100.06718.93
5.4.280.0030.06319.07
5.4.270.0100.05719.11
5.4.260.0130.06019.02
5.4.250.0170.06019.00
5.4.240.0070.07319.16
5.4.230.0130.03718.90
5.4.220.0030.06019.19
5.4.210.0170.05319.02
5.4.200.0030.05319.07
5.4.190.0000.04019.11
5.4.180.0100.03319.11
5.4.170.0000.04018.94
5.4.160.0100.05319.23
5.4.150.0070.03719.17
5.4.140.0070.03316.28
5.4.130.0030.04016.31
5.4.120.0130.03316.50
5.4.110.0000.03716.29
5.4.100.0030.04716.35
5.4.90.0030.03716.41
5.4.80.0030.03316.56
5.4.70.0000.08316.23
5.4.60.0070.06716.50
5.4.50.0030.03716.21
5.4.40.0030.03716.53
5.4.30.0070.05016.34
5.4.20.0030.03316.20
5.4.10.0170.02316.20
5.4.00.0000.04715.70
5.3.290.0100.07314.59
5.3.280.0070.08014.46
5.3.270.0030.03714.50
5.3.260.0000.04014.55
5.3.250.0000.03714.70
5.3.240.0030.05314.70
5.3.230.0030.04014.42
5.3.220.0130.02314.46
5.3.210.0000.05314.63
5.3.200.0130.06714.63
5.3.190.0100.06714.41
5.3.180.0030.04014.62
5.3.170.0030.03314.62
5.3.160.0100.07014.40
5.3.150.0130.06714.57
5.3.140.0070.04714.64
5.3.130.0070.04014.44
5.3.120.0130.04014.48
5.3.110.0070.06714.43
5.3.100.0070.04013.97
5.3.90.0100.03014.08
5.3.80.0100.03014.03
5.3.70.0070.03313.80
5.3.60.0030.07313.90
5.3.50.0030.07713.73
5.3.40.0030.06013.80
5.3.30.0030.03713.96
5.3.20.0070.06013.70
5.3.10.0100.05013.48
5.3.00.0030.04313.54
5.2.170.0030.02712.00
5.2.160.0030.06312.00
5.2.150.0030.05712.00
5.2.140.0000.03712.00
5.2.130.0100.05712.00
5.2.120.0070.06312.00
5.2.110.0030.06012.00
5.2.100.0070.03312.00
5.2.90.0030.05012.00
5.2.80.0030.03312.00
5.2.70.0030.02712.00
5.2.60.0000.05312.00
5.2.50.0030.04012.00
5.2.40.0130.02012.00
5.2.30.0030.06312.00
5.2.20.0100.04712.00
5.2.10.0030.02712.00
5.2.00.0030.02312.00
5.1.60.0030.02012.00
5.1.50.0030.02712.00
5.1.40.0100.01712.00
5.1.30.0000.02712.00
5.1.20.0000.03012.00
5.1.10.0030.02312.00
5.1.00.0000.02712.00
5.0.50.0000.02012.00
5.0.40.0000.02012.00
5.0.30.0000.02712.00
5.0.20.0000.02012.00
5.0.10.0000.02012.00
5.0.00.0000.02712.00
4.4.90.0030.02712.00
4.4.80.0030.02312.00
4.4.70.0030.03312.00
4.4.60.0000.01712.00
4.4.50.0000.02712.00
4.4.40.0000.04712.00
4.4.30.0000.01712.00
4.4.20.0000.02312.00
4.4.10.0030.01312.00
4.4.00.0030.02312.00
4.3.110.0000.01712.00
4.3.100.0000.01312.00
4.3.90.0000.01312.00
4.3.80.0000.02712.00
4.3.70.0000.01312.00
4.3.60.0030.01012.00
4.3.50.0030.01012.00
4.3.40.0030.02012.00
4.3.30.0000.01312.00
4.3.20.0000.01312.00
4.3.10.0000.01312.00
4.3.00.0000.01312.00

preferences:
62.69 ms | 401 KiB | 5 Q