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:12: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.70.0210.00016.75
8.3.60.0100.01016.50
8.3.50.0080.00822.02
8.3.40.0110.00418.79
8.3.30.0140.00719.24
8.3.20.0080.00020.21
8.3.10.0050.00323.61
8.3.00.0000.00719.08
8.2.180.0090.00616.48
8.2.170.0110.00322.96
8.2.160.0110.00320.39
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00420.79
8.2.110.0060.00321.02
8.2.100.0040.00817.84
8.2.90.0050.00319.36
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0030.00718.05
8.2.50.0000.01118.07
8.2.40.0080.00021.25
8.2.30.0000.00718.19
8.2.20.0000.00717.73
8.2.10.0040.00418.00
8.2.00.0040.00417.69
8.1.280.0140.00725.92
8.1.270.0000.00923.96
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0040.00422.20
8.1.230.0000.01120.73
8.1.220.0050.00317.78
8.1.210.0030.00618.77
8.1.200.0030.00617.38
8.1.190.0030.00717.00
8.1.180.0000.00818.10
8.1.170.0000.00918.37
8.1.160.0000.00722.05
8.1.150.0000.00718.53
8.1.140.0000.00717.29
8.1.130.0030.00317.88
8.1.120.0070.00017.41
8.1.110.0080.00017.27
8.1.100.0000.00817.46
8.1.90.0040.00417.32
8.1.80.0070.00017.30
8.1.70.0030.00317.37
8.1.60.0060.00317.46
8.1.50.0040.00417.59
8.1.40.0040.00417.47
8.1.30.0030.00517.54
8.1.20.0040.00417.60
8.1.10.0000.00817.61
8.1.00.0040.00417.45
8.0.300.0050.00218.77
8.0.290.0090.00016.88
8.0.280.0070.00018.45
8.0.270.0070.00017.14
8.0.260.0030.00317.25
8.0.250.0040.00416.94
8.0.240.0000.00716.89
8.0.230.0070.00016.89
8.0.220.0070.00016.89
8.0.210.0000.00716.91
8.0.200.0060.00016.93
8.0.190.0070.00017.00
8.0.180.0000.00816.94
8.0.170.0080.00016.98
8.0.160.0030.00316.95
8.0.150.0030.00316.85
8.0.140.0000.00716.70
8.0.130.0060.00313.25
8.0.120.0030.00616.79
8.0.110.0040.00416.92
8.0.100.0000.00716.89
8.0.90.0030.00516.94
8.0.80.0120.00316.83
8.0.70.0030.00516.73
8.0.60.0000.00816.72
8.0.50.0060.00316.78
8.0.30.0110.00817.19
8.0.20.0110.00717.40
8.0.10.0070.00016.90
8.0.00.0080.01216.77
7.4.330.0030.00315.00
7.4.320.0030.00316.32
7.4.300.0030.00316.60
7.4.290.0050.00516.55
7.4.280.0050.00316.59
7.4.270.0000.00716.53
7.4.260.0000.00716.48
7.4.250.0050.00316.57
7.4.240.0060.00116.59
7.4.230.0080.00016.64
7.4.220.0140.00716.63
7.4.210.0090.00516.48
7.4.200.0000.00716.59
7.4.190.0030.00316.73
7.4.160.0110.00716.43
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0070.01116.54
7.4.120.0150.00716.48
7.4.110.0150.00316.49
7.4.100.0140.00816.38
7.4.90.0120.00516.52
7.4.80.0090.00919.39
7.4.70.0120.00416.39
7.4.60.0030.01516.45
7.4.50.0040.00416.47
7.4.40.0100.00716.67
7.4.30.0080.00816.48
7.4.00.0060.00914.88
7.3.330.0070.00013.44
7.3.320.0000.00513.38
7.3.310.0070.00016.41
7.3.300.0030.00316.44
7.3.290.0030.01616.48
7.3.280.0090.00916.42
7.3.270.0090.00917.40
7.3.260.0130.00716.43
7.3.250.0140.00916.42
7.3.240.0150.00616.43
7.3.230.0090.00816.58
7.3.210.0100.00716.48
7.3.200.0070.01019.39
7.3.190.0120.00416.41
7.3.180.0090.01216.42
7.3.170.0040.01316.55
7.3.160.0060.00916.40
7.3.120.0090.00615.04
7.3.10.0100.00716.56
7.3.00.0070.00716.40
7.2.330.0070.01016.52
7.2.320.0140.00316.60
7.2.310.0100.00716.41
7.2.300.0160.00716.80
7.2.290.0070.01416.79
7.2.130.0050.00916.62
7.2.120.0070.00816.79
7.2.110.0110.00716.83
7.2.100.0080.00716.79
7.2.90.0130.00816.63
7.2.80.0100.00816.96
7.2.70.0210.00516.93
7.2.60.0160.00716.88
7.2.50.0090.00616.87
7.2.40.0090.00616.76
7.2.30.0090.00916.46
7.2.20.0060.01116.72
7.2.10.0070.01116.67
7.2.00.0080.00817.73
7.1.250.0110.00415.31
7.1.100.0070.00718.20
7.1.70.0000.00817.38
7.1.60.0070.00419.46
7.1.50.0130.01016.70
7.1.00.0000.08022.30
7.0.200.0000.01016.52
7.0.140.0170.06022.11
7.0.60.0070.07719.94
7.0.50.0100.05317.98
7.0.40.0000.05020.23
7.0.30.0230.06320.33
7.0.20.0300.07320.23
7.0.10.0100.04020.15
7.0.00.0070.09020.16
5.6.280.0000.07721.10
5.6.210.0070.05020.48
5.6.200.0070.08718.25
5.6.190.0070.04320.48
5.6.180.0070.04320.34
5.6.170.0270.08020.52
5.6.160.0070.04320.48
5.6.150.0100.06718.16
5.6.140.0070.04318.23
5.6.130.0130.05718.18
5.6.120.0100.03721.02
5.6.110.0170.05320.89
5.6.100.0100.04021.12
5.6.90.0230.07021.13
5.6.80.0070.05320.38
5.5.350.0030.04320.44
5.5.340.0030.05018.02
5.5.330.0030.04720.41
5.5.320.0270.04320.30
5.5.310.0300.07020.28
5.5.300.0030.04318.07
5.5.290.0030.04718.08
5.5.280.0030.07720.89
5.5.270.0170.06320.88
5.5.260.0030.06020.77
5.5.250.0130.07720.61
5.5.240.0130.06720.16
5.4.450.0700.07019.30
5.4.440.0200.05319.57
5.4.430.0430.05319.62
5.4.420.0900.05719.54
5.4.410.1070.06719.54
5.4.400.1030.04719.22
5.4.390.0830.06019.30
5.4.380.0270.06018.77
5.4.370.0330.05718.41
5.4.360.0430.04718.56
5.4.350.0230.06018.75
5.4.340.0330.05318.48
5.4.320.0060.05212.51
5.4.310.0050.04012.50
5.4.300.0080.04312.50
5.4.290.0080.04012.50
5.4.280.0070.04612.40
5.4.270.0070.04312.40
5.4.260.0060.04412.40
5.4.250.0090.04012.40
5.4.240.0120.03512.40
5.4.230.0070.04112.39
5.4.220.0100.04212.39
5.4.210.0110.04812.39
5.4.200.0080.05412.39
5.4.190.0090.05112.39
5.4.180.0070.05312.39
5.4.170.0040.05612.40
5.4.160.0140.04412.39
5.4.150.0120.04612.39
5.4.140.0080.05312.07
5.4.130.0060.05012.06
5.4.120.0110.04812.02
5.4.110.0130.04712.02
5.4.100.0110.04512.01
5.4.90.0120.07112.01
5.4.80.0050.05512.01
5.4.70.0070.05112.01
5.4.60.0050.05312.01
5.4.50.0090.05012.01
5.4.40.0100.04912.00
5.4.30.0080.05112.00
5.4.20.0080.05111.99
5.4.10.0140.04912.00
5.4.00.0090.04911.48
5.3.290.0030.05712.80
5.3.280.0060.05512.71
5.3.270.0030.06012.73
5.3.260.0070.05712.72
5.3.250.0120.05112.72
5.3.240.0140.06612.72
5.3.230.0080.05212.70
5.3.220.0080.05412.68
5.3.210.0070.05612.68
5.3.200.0090.05212.68
5.3.190.0050.05512.68
5.3.180.0070.05412.67
5.3.170.0070.05412.67
5.3.160.0030.05812.67
5.3.150.0070.05612.68
5.3.140.0080.05212.66
5.3.130.0140.05012.65
5.3.120.0120.05312.66
5.3.110.0110.05312.66
5.3.100.0050.04912.12
5.3.90.0080.04912.10
5.3.80.0100.05112.09
5.3.70.0070.05712.09
5.3.60.0110.05512.09
5.3.50.0100.03712.02
5.3.40.0070.04212.04
5.3.30.0070.04311.98
5.3.20.0040.04511.76
5.3.10.0070.05011.73
5.3.00.0060.04811.72
5.2.170.0050.0489.21
5.2.160.0070.0369.21
5.2.150.0070.0379.21
5.2.140.0100.0409.21
5.2.130.0100.0359.17
5.2.120.0040.0399.17
5.2.110.0050.0379.18
5.2.100.0070.0359.17
5.2.90.0060.0369.18
5.2.80.0060.0379.17
5.2.70.0040.0449.17
5.2.60.0060.0349.13
5.2.50.0060.0479.09
5.2.40.0060.0409.07
5.2.30.0060.0419.04
5.2.20.0050.0399.03
5.2.10.0040.0408.94
5.2.00.0050.0418.80
5.1.60.0040.0348.09
5.1.50.0050.0338.08
5.1.40.0050.0358.06
5.1.30.0030.0378.41
5.1.20.0060.0358.43
5.1.10.0080.0348.16
5.1.00.0050.0388.16
5.0.50.0040.0296.63
5.0.40.0050.0286.50
5.0.30.0050.0426.32
5.0.20.0040.0286.27
5.0.10.0040.0296.25
5.0.00.0100.0426.25
4.4.90.0040.0274.78
4.4.80.0030.0284.76
4.4.70.0040.0154.75
4.4.60.0050.0244.75
4.4.50.0050.0244.77
4.4.40.0020.0404.71
4.4.30.0040.0234.76
4.4.20.0020.0264.85
4.4.10.0040.0184.85
4.4.00.0030.0374.76
4.3.110.0020.0264.67
4.3.100.0080.0274.67
4.3.90.0070.0224.63
4.3.80.0030.0344.58
4.3.70.0030.0234.63
4.3.60.0040.0224.63
4.3.50.0030.0244.62
4.3.40.0050.0334.54
4.3.30.0050.0213.30
4.3.20.0040.0243.28
4.3.10.0030.0243.24
4.3.00.0170.0207.35

preferences:
38.49 ms | 401 KiB | 5 Q