3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dias_transcurridos($fecha_i,$fecha_f) { $formato="d-m-Y"; $diff = abs(DateTime::createFromFormat($formato,$fecha_i)-DateTime::createFromFormat($formato,$fecha_f)); echo $diff; echo floor($diff/(60*60*24)); return $diff; }; echo dias_transcurridos("2014-06-01","2014-06-03");

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.0070.01016.50
8.3.50.0100.00922.90
8.3.40.0070.01318.79
8.3.30.0080.00619.23
8.3.20.0040.00420.16
8.3.10.0040.00421.64
8.3.00.0070.00317.75
8.2.180.0130.00916.75
8.2.170.0080.01222.96
8.2.160.0120.00320.47
8.2.150.0000.00824.18
8.2.140.0110.00724.66
8.2.130.0050.00326.16
8.2.120.0040.00421.00
8.2.110.0090.00022.25
8.2.100.0060.00618.03
8.2.90.0040.00419.08
8.2.80.0000.00817.97
8.2.70.0030.00617.88
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0050.00217.98
8.2.20.0040.00417.88
8.2.10.0040.00418.13
8.2.00.0070.00418.00
8.1.280.0130.00325.92
8.1.270.0090.00023.88
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.86
8.1.230.0070.00419.13
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0000.00918.66
8.1.160.0040.00421.85
8.1.150.0000.00818.73
8.1.140.0000.00717.41
8.1.130.0030.00317.89
8.1.120.0030.00317.38
8.1.110.0040.00417.36
8.1.100.0030.00317.47
8.1.90.0030.00317.52
8.1.80.0000.00717.40
8.1.70.0040.00417.38
8.1.60.0080.00017.61
8.1.50.0030.00617.45
8.1.40.0000.00717.51
8.1.30.0050.00317.55
8.1.20.0040.00417.56
8.1.10.0000.00717.61
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.38
8.0.270.0070.00017.11
8.0.260.0030.00317.23
8.0.250.0070.00017.17
8.0.240.0030.00617.16
8.0.230.0000.00717.03
8.0.220.0030.00317.09
8.0.210.0070.00017.09
8.0.200.0060.00317.06
8.0.190.0040.00417.09
8.0.180.0040.00416.95
8.0.170.0000.00817.06
8.0.160.0030.00616.92
8.0.150.0000.00716.95
8.0.140.0030.00517.05
8.0.130.0030.00313.45
8.0.120.0000.00817.02
8.0.110.0030.00516.91
8.0.100.0040.00416.97
8.0.90.0030.00316.82
8.0.80.0100.00716.98
8.0.70.0050.00316.84
8.0.60.0080.00017.02
8.0.50.0000.00716.84
8.0.30.0120.00617.11
8.0.20.0100.01317.40
8.0.10.0030.00317.05
8.0.00.0070.01316.93
7.4.330.0050.00015.03
7.4.320.0060.00016.47
7.4.300.0030.00316.58
7.4.290.0040.00416.53
7.4.280.0080.00016.56
7.4.270.0030.00316.61
7.4.260.0030.00316.59
7.4.250.0040.00416.46
7.4.240.0030.00416.57
7.4.230.0040.00416.40
7.4.220.0100.01316.40
7.4.210.0070.00716.72
7.4.200.0030.00316.56
7.4.160.0070.01016.61
7.4.150.0150.00317.40
7.4.140.0120.00817.86
7.4.130.0110.00616.52
7.4.120.0050.01516.44
7.4.110.0110.00616.51
7.4.100.0060.01216.64
7.4.90.0080.00816.64
7.4.80.0070.01019.39
7.4.70.0120.00616.71
7.4.60.0090.00916.64
7.4.50.0050.00016.21
7.4.40.0070.01016.61
7.4.30.0030.01316.47
7.4.00.0070.01015.00
7.3.330.0050.00213.26
7.3.320.0050.00013.43
7.3.310.0000.00716.32
7.3.300.0000.00716.52
7.3.290.0090.00616.41
7.3.280.0090.01016.37
7.3.270.0090.00917.40
7.3.260.0110.00616.57
7.3.250.0140.00316.54
7.3.240.0090.00916.62
7.3.230.0060.01016.50
7.3.210.0100.01016.27
7.3.200.0070.01719.39
7.3.190.0140.00316.52
7.3.180.0060.00916.44
7.3.170.0100.00716.57
7.3.160.0060.01016.60
7.3.10.0030.01016.88
7.3.00.0090.00316.75
7.2.330.0140.00316.83
7.2.320.0140.01016.86
7.2.310.0110.00616.46
7.2.300.0160.00716.61
7.2.290.0100.00616.60
7.2.130.0000.01016.80
7.2.120.0060.00717.04
7.2.110.0050.00516.92
7.2.100.0110.00316.73
7.2.90.0090.00617.09
7.2.80.0110.00416.77
7.2.70.0000.01417.15
7.2.60.0090.00616.98
7.2.50.0090.00616.83
7.2.40.0090.00616.98
7.2.30.0070.00716.89
7.2.20.0080.00616.89
7.2.10.0030.00616.95
7.2.00.0080.00618.18
7.1.250.0140.00015.76
7.1.200.0030.00515.90
7.1.100.0030.01018.04
7.1.70.0040.01117.30
7.1.60.0130.01319.40
7.1.50.0070.01416.81
7.1.00.0100.07022.45
7.0.200.0070.00017.05
7.0.140.0070.06722.11
7.0.60.0100.07720.02
7.0.50.0030.08317.90
7.0.40.0100.04020.09
7.0.30.0330.07320.23
7.0.20.0230.04020.06
7.0.10.0200.04320.06
7.0.00.0100.03720.22
5.6.280.0070.07020.99
5.6.210.0030.04020.68
5.6.200.0070.03718.29
5.6.190.0000.05720.42
5.6.180.0270.06320.63
5.6.170.0330.07020.45
5.6.160.0030.04320.46
5.6.150.0070.03718.17
5.6.140.0330.04718.14
5.6.130.0100.06018.19
5.6.120.0030.04320.90
5.6.110.0070.08321.02
5.6.100.0170.05321.04
5.6.90.0070.04320.98
5.6.80.0230.06720.54
5.5.350.0370.06320.34
5.5.340.0030.04317.95
5.5.330.0100.08020.29
5.5.320.0270.04020.20
5.5.310.0330.05020.32
5.5.300.0070.03318.01
5.5.290.0030.05318.07
5.5.280.0070.08320.82
5.5.270.0170.06320.77
5.5.260.0130.05320.84
5.5.250.0070.09320.79
5.5.240.0130.06720.29
5.4.450.0930.05319.45
5.4.440.0630.05719.28
5.4.430.0070.05719.52
5.4.420.0630.05319.29
5.4.410.0530.05019.32
5.4.400.0100.05319.33
5.4.390.0870.06319.12
5.4.380.0170.05018.59
5.4.370.0070.05018.42
5.4.360.0170.03718.68
5.4.350.0070.05012.02
5.4.340.0100.03612.01
5.4.320.0070.03512.50
5.4.310.0080.03612.50
5.4.300.0050.04112.50
5.4.290.0050.04012.50
5.4.280.0090.03312.40
5.4.270.0060.03612.40
5.4.260.0060.03812.40
5.4.250.0050.03812.40
5.4.240.0050.03612.39
5.4.230.0050.04012.39
5.4.220.0040.03812.39
5.4.210.0040.03612.39
5.4.200.0050.03812.39
5.4.190.0110.03812.39
5.4.180.0050.03712.39
5.4.170.0090.03212.40
5.4.160.0070.03612.39
5.4.150.0080.03612.39
5.4.140.0090.03812.07
5.4.130.0040.03712.06
5.4.120.0080.03812.02
5.4.110.0080.03812.01
5.4.100.0050.04312.02
5.4.90.0070.03912.01
5.4.80.0090.04012.01
5.4.70.0090.04512.01
5.4.60.0130.05212.01
5.4.50.0090.03912.01
5.4.40.0060.03612.00
5.4.30.0070.04411.99
5.4.20.0070.03812.00
5.4.10.0040.04111.99
5.4.00.0060.04011.49
5.3.290.0070.03712.80
5.3.280.0070.03712.71
5.3.270.0040.04112.72
5.3.260.0060.03912.72
5.3.250.0070.03712.72
5.3.240.0050.04112.72
5.3.230.0040.03912.70
5.3.220.0070.03512.68
5.3.210.0070.03812.68
5.3.200.0090.03312.68
5.3.190.0050.03912.68
5.3.180.0070.03612.67
5.3.170.0170.03212.67
5.3.160.0090.03512.68
5.3.150.0070.03512.67
5.3.140.0060.04312.66
5.3.130.0100.03412.65
5.3.120.0060.04312.66
5.3.110.0080.03812.66
5.3.100.0040.03812.12
5.3.90.0070.03512.11
5.3.80.0070.03512.10
5.3.70.0080.03512.09
5.3.60.0080.03412.08
5.3.50.0050.03712.02
5.3.40.0060.03712.02
5.3.30.0090.03311.98
5.3.20.0040.03811.77
5.3.10.0070.03811.73
5.3.00.0080.03611.72
5.2.170.0050.0329.21
5.2.160.0050.0319.22
5.2.150.0060.0319.21
5.2.140.0100.0369.21
5.2.130.0050.0329.17
5.2.120.0050.0289.17
5.2.110.0070.0269.18
5.2.100.0040.0379.18
5.2.90.0060.0279.18
5.2.80.0070.0279.17
5.2.70.0030.0329.18
5.2.60.0050.0299.13
5.2.50.0070.0279.09
5.2.40.0070.0269.07
5.2.30.0050.0299.05
5.2.20.0040.0299.04
5.2.10.0040.0288.95
5.2.00.0040.0298.81
5.1.60.0040.0248.09
5.1.50.0020.0268.09
5.1.40.0030.0258.06
5.1.30.0040.0308.42
5.1.20.0040.0278.44
5.1.10.0030.0268.16
5.1.00.0050.0328.16
5.0.50.0050.0236.64
5.0.40.0060.0166.50
5.0.30.0040.0306.31
5.0.20.0040.0256.28
5.0.10.0040.0186.26
5.0.00.0050.0306.25
4.4.90.0040.0144.78
4.4.80.0010.0164.75
4.4.70.0030.0144.75
4.4.60.0070.0204.75
4.4.50.0030.0194.77
4.4.40.0030.0314.71
4.4.30.0020.0164.75
4.4.20.0030.0174.85
4.4.10.0020.0164.85
4.4.00.0060.0284.76
4.3.110.0030.0154.67
4.3.100.0050.0154.67
4.3.90.0020.0184.63
4.3.80.0030.0234.58
4.3.70.0030.0144.63
4.3.60.0040.0164.63
4.3.50.0020.0194.63
4.3.40.0020.0344.54
4.3.30.0030.0223.30
4.3.20.0040.0133.28
4.3.10.0020.0153.24
4.3.00.0130.0207.21

preferences:
40.37 ms | 401 KiB | 5 Q