3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Count the number of days since the beginning of the year. // // DD:MM:YYYY function dayCount($date) { $day = strtok($date, ":"); // print $day; $month = strtok(":") - 1; // print $month; $months = array(31,28,31,30,31,30,31,31,30,31,30,31); for ($i = 0; $i < $month; $i++) { $days += $months[$i]; } $days += $day; print $days; } dayCount("17:02:2012"); ?>

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.0140.00416.63
8.3.50.0150.00321.92
8.3.40.0090.00619.11
8.3.30.0110.00419.09
8.3.20.0030.00520.34
8.3.10.0000.00823.49
8.3.00.0040.00419.08
8.2.180.0110.00816.88
8.2.170.0040.01122.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00020.90
8.2.110.0120.00021.06
8.2.100.0090.00318.03
8.2.90.0030.00619.34
8.2.80.0050.00317.97
8.2.70.0060.00317.63
8.2.60.0040.00418.04
8.2.50.0000.00818.07
8.2.40.0060.00321.07
8.2.30.0000.00718.23
8.2.20.0000.00817.68
8.2.10.0040.00418.17
8.2.00.0080.00017.87
8.1.280.0110.00425.92
8.1.270.0050.00323.87
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00321.29
8.1.230.0100.00019.16
8.1.220.0030.00517.77
8.1.210.0000.00818.77
8.1.200.0080.00417.10
8.1.190.0070.00317.10
8.1.180.0040.00418.10
8.1.170.0040.00418.49
8.1.160.0040.00421.87
8.1.150.0070.00018.54
8.1.140.0060.00317.30
8.1.130.0070.00017.79
8.1.120.0030.00517.48
8.1.110.0000.00817.41
8.1.100.0080.00017.37
8.1.90.0030.00617.32
8.1.80.0000.00817.36
8.1.70.0000.00717.39
8.1.60.0050.00317.60
8.1.50.0030.00617.52
8.1.40.0000.00917.54
8.1.30.0040.00417.57
8.1.20.0000.00817.72
8.1.10.0050.00317.47
8.1.00.0000.00817.51
8.0.300.0000.00718.77
8.0.290.0060.00317.05
8.0.280.0040.00418.36
8.0.270.0030.00517.32
8.0.260.0000.00717.26
8.0.250.0000.00617.04
8.0.240.0030.00316.91
8.0.230.0000.00716.93
8.0.220.0000.00716.96
8.0.210.0070.00016.80
8.0.200.0000.00716.87
8.0.190.0030.00316.82
8.0.180.0000.00816.94
8.0.170.0040.00416.80
8.0.160.0000.00716.77
8.0.150.0030.00516.91
8.0.140.0040.00416.74
8.0.130.0070.00013.31
8.0.120.0050.00316.72
8.0.110.0000.00716.81
8.0.100.0000.00716.72
8.0.90.0000.00816.91
8.0.80.0090.00616.84
8.0.70.0000.00716.89
8.0.60.0040.00416.68
8.0.50.0050.00316.79
8.0.30.0130.00617.23
8.0.20.0090.00917.40
8.0.10.0000.00716.83
8.0.00.0110.00816.76
7.4.330.0060.00015.00
7.4.320.0000.00616.40
7.4.300.0030.00316.48
7.4.290.0030.00616.54
7.4.280.0030.00316.50
7.4.270.0070.00016.55
7.4.260.0070.00016.49
7.4.250.0040.00416.48
7.4.240.0020.00516.61
7.4.230.0030.00316.53
7.4.220.0070.01116.47
7.4.210.0080.00516.55
7.4.200.0030.00516.50
7.4.190.0000.00716.41
7.4.160.0090.00916.62
7.4.150.0190.00017.40
7.4.140.0140.00817.86
7.4.130.0090.01116.56
7.4.120.0110.00616.63
7.4.110.0060.01216.71
7.4.100.0110.01116.64
7.4.90.0090.00916.59
7.4.80.0090.00919.39
7.4.70.0090.00616.61
7.4.60.0090.00916.58
7.4.50.0000.00616.65
7.4.40.0130.00416.53
7.4.30.0150.00016.41
7.4.00.0060.00315.06
7.3.330.0030.00313.29
7.3.320.0000.00613.24
7.3.310.0050.00316.47
7.3.300.0030.00316.35
7.3.290.0180.00416.42
7.3.280.0080.00916.41
7.3.270.0080.00917.40
7.3.260.0100.00716.61
7.3.250.0080.01216.39
7.3.240.0040.01416.42
7.3.230.0070.01016.43
7.3.210.0060.01216.41
7.3.200.0140.00319.39
7.3.190.0030.01316.59
7.3.180.0130.01016.50
7.3.170.0080.01416.66
7.3.160.0110.00416.56
7.3.120.0070.00414.84
7.2.330.0070.01016.79
7.2.320.0070.01116.70
7.2.310.0060.01216.74
7.2.300.0090.01516.46
7.2.290.0070.01016.86
7.2.00.0030.00819.73
7.1.200.0090.00615.93
7.1.100.0000.00917.92
7.1.70.0030.00317.09
7.1.60.0100.01019.46
7.1.50.0100.01317.14
7.1.00.0000.08022.48
7.0.200.0060.01215.01
7.0.140.0130.06321.99
7.0.60.0130.08320.00
7.0.50.0030.05317.88
7.0.40.0100.08320.18
7.0.30.0500.04320.19
7.0.20.0330.07020.21
7.0.10.0030.05320.16
7.0.00.0070.04020.14
5.6.280.0100.06720.78
5.6.210.0100.08020.71
5.6.200.0070.08318.29
5.6.190.0070.07020.61
5.6.180.4030.04020.67
5.6.170.0130.05320.47
5.6.160.0000.06320.46
5.6.150.0070.03718.23
5.6.140.0030.04018.27
5.6.130.0130.05718.15
5.6.120.0030.04721.09
5.6.110.0030.04721.00
5.6.100.0100.07020.99
5.6.90.0170.04720.94
5.6.80.0130.07720.40
5.6.70.4000.03320.41
5.5.350.0370.07020.41
5.5.340.0100.08017.99
5.5.330.0130.08020.21
5.5.320.0370.04720.27
5.5.310.0270.07720.32
5.5.300.0030.05717.98
5.5.290.0030.04017.99
5.5.280.0070.08720.98
5.5.270.0170.07720.87
5.5.260.0130.06320.76
5.5.250.0070.06020.66
5.5.240.0100.04320.16
5.4.450.0200.08019.48
5.4.440.0770.06019.19
5.4.430.0930.05019.41
5.4.420.1200.06019.22
5.4.410.0070.05319.38
5.4.400.0030.07019.22
5.4.390.1070.05319.24
5.4.380.0330.05318.68
5.4.370.0370.05018.79
5.4.360.0470.05718.48
5.4.350.0300.05318.77
5.4.340.0330.05018.77
5.4.320.0040.03812.50
5.4.310.0060.04412.50
5.4.300.0090.04012.51
5.4.290.0030.04812.50
5.4.280.0110.03912.40
5.4.270.0080.04212.40
5.4.260.0080.04312.40
5.4.250.0030.04912.40
5.4.240.0060.04912.39
5.4.230.0090.04112.39
5.4.220.0080.04012.39
5.4.210.0070.03812.39
5.4.200.0070.04812.39
5.4.190.0100.04612.38
5.4.180.0080.04512.39
5.4.170.0070.04412.39
5.4.160.0110.03512.39
5.4.150.0050.04112.39
5.4.140.0060.04212.07
5.4.130.0050.04412.06
5.4.120.0080.04012.02
5.4.110.0070.04112.01
5.4.100.0060.04212.01
5.4.90.0110.03912.01
5.4.80.0070.04312.01
5.4.70.0080.03912.01
5.4.60.0030.03812.01
5.4.50.0040.04212.01
5.4.40.0110.03112.00
5.4.30.0070.03711.99
5.4.20.0040.03811.99
5.4.10.0080.03511.99
5.4.00.0100.03911.48
5.3.290.0070.04112.80
5.3.280.0080.04012.71
5.3.270.0080.04312.73
5.3.260.0110.03812.71
5.3.250.0090.03912.72
5.3.240.0120.04212.72
5.3.230.0120.04912.70
5.3.220.0060.05712.68
5.3.210.0090.05412.68
5.3.200.0100.05412.68
5.3.190.0120.04812.68
5.3.180.0070.04812.67
5.3.170.0100.03912.67
5.3.160.0090.03812.68
5.3.150.0100.03612.67
5.3.140.0080.04312.66
5.3.130.0050.04712.66
5.3.120.0080.04312.66
5.3.110.0090.04412.66
5.3.100.0110.04612.12
5.3.90.0080.05112.10
5.3.80.0060.04212.09
5.3.70.0040.04012.09
5.3.60.0060.03712.08
5.3.50.0070.03612.02
5.3.40.0040.04112.02
5.3.30.0110.03911.98
5.3.20.0100.03711.76
5.3.10.0080.04011.73
5.3.00.0080.04211.72
5.2.170.0030.0369.21
5.2.160.0090.0329.21
5.2.150.0080.0369.21
5.2.140.0070.0379.21
5.2.130.0050.0409.17
5.2.120.0080.0369.18
5.2.110.0090.0329.18
5.2.100.0050.0339.17
5.2.90.0030.0339.18
5.2.80.0060.0319.16
5.2.70.0060.0409.17
5.2.60.0060.0419.13
5.2.50.0040.0439.10
5.2.40.0040.0379.07
5.2.30.0060.0359.05
5.2.20.0060.0319.03
5.2.10.0080.0308.94
5.2.00.0060.0308.80
5.1.60.0050.0288.09
5.1.50.0080.0278.09
5.1.40.0060.0238.06
5.1.30.0070.0278.41
5.1.20.0080.0308.43
5.1.10.0040.0328.16
5.1.00.0070.0298.16
5.0.50.0090.0216.64
5.0.40.0030.0316.50
5.0.30.0060.0416.31
5.0.20.0090.0216.28
5.0.10.0060.0266.25
5.0.00.0050.0376.25
4.4.90.0020.0224.78
4.4.80.0030.0214.76
4.4.70.0040.0204.76
4.4.60.0020.0224.76
4.4.50.0030.0214.77
4.4.40.0020.0334.70
4.4.30.0040.0204.76
4.4.20.0020.0224.84
4.4.10.0030.0214.84
4.4.00.0030.0324.76
4.3.110.0030.0234.67
4.3.100.0060.0194.66
4.3.90.0040.0204.63
4.3.80.0030.0324.58
4.3.70.0030.0204.63
4.3.60.0050.0194.63
4.3.50.0050.0194.63
4.3.40.0030.0314.54
4.3.30.0030.0203.30
4.3.20.0010.0233.27
4.3.10.0020.0213.24
4.3.00.0030.0207.63

preferences:
41.49 ms | 401 KiB | 5 Q