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 = $date[0] + $date[1]; print $day; $month = $date[3] + $date[4]; 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("15:01: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.0070.00718.56
8.3.50.0080.00721.94
8.3.40.0040.01118.79
8.3.30.0100.01019.04
8.3.20.0050.00220.16
8.3.10.0000.00823.48
8.3.00.0080.00020.77
8.2.180.0090.00916.63
8.2.170.0150.00622.96
8.2.160.0100.00320.39
8.2.150.0050.00224.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0030.00520.55
8.2.110.0090.00022.13
8.2.100.0070.00317.91
8.2.90.0000.00719.30
8.2.80.0040.00417.97
8.2.70.0060.00317.88
8.2.60.0070.00417.91
8.2.50.0070.00318.07
8.2.40.0040.00421.04
8.2.30.0020.00518.27
8.2.20.0060.00317.82
8.2.10.0040.00418.18
8.2.00.0040.00417.71
8.1.280.0100.00725.92
8.1.270.0060.00323.71
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0090.00023.92
8.1.230.0110.00019.18
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.13
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00418.45
8.1.160.0040.00421.86
8.1.150.0040.00418.57
8.1.140.0000.00817.30
8.1.130.0070.00017.73
8.1.120.0040.00417.43
8.1.110.0000.00717.43
8.1.100.0020.00517.34
8.1.90.0070.00017.42
8.1.80.0030.00517.39
8.1.70.0000.00717.34
8.1.60.0070.00417.61
8.1.50.0000.00817.52
8.1.40.0060.00617.54
8.1.30.0000.00917.62
8.1.20.0040.00417.70
8.1.10.0050.00217.60
8.1.00.0020.00517.49
8.0.300.0070.00018.77
8.0.290.0070.00016.91
8.0.280.0070.00018.50
8.0.270.0070.00017.27
8.0.260.0000.00717.29
8.0.250.0040.00417.00
8.0.240.0040.00416.89
8.0.230.0040.00416.86
8.0.220.0000.00716.85
8.0.210.0000.00616.90
8.0.200.0000.00617.00
8.0.190.0050.00216.94
8.0.180.0000.00716.96
8.0.170.0000.00816.77
8.0.160.0070.00016.77
8.0.150.0070.00016.82
8.0.140.0000.00716.86
8.0.130.0050.00313.34
8.0.120.0050.00316.86
8.0.110.0000.00716.81
8.0.100.0040.00416.76
8.0.90.0040.00416.75
8.0.80.0130.00616.95
8.0.70.0050.00316.79
8.0.60.0070.00016.83
8.0.50.0000.00716.67
8.0.30.0090.01117.27
8.0.20.0120.00617.41
8.0.10.0040.00417.05
8.0.00.0080.01117.03
7.4.330.0030.00315.01
7.4.320.0000.00616.49
7.4.300.0060.00016.63
7.4.290.0030.00716.49
7.4.280.0000.00716.50
7.4.270.0040.00416.41
7.4.260.0000.00716.48
7.4.250.0040.00416.45
7.4.240.0040.00416.50
7.4.230.0040.00416.48
7.4.220.0090.00916.63
7.4.210.0060.00816.57
7.4.200.0030.00316.67
7.4.190.0000.00716.36
7.4.160.0060.01216.70
7.4.150.0030.01517.40
7.4.140.0070.01217.86
7.4.130.0080.01116.45
7.4.120.0110.00916.45
7.4.110.0140.00316.45
7.4.100.0110.01116.59
7.4.90.0000.01816.50
7.4.80.0120.00919.39
7.4.70.0160.00016.41
7.4.60.0070.01316.50
7.4.50.0000.00616.40
7.4.40.0080.00816.53
7.4.30.0000.01616.50
7.4.00.0120.00715.10
7.3.330.0000.00513.36
7.3.320.0000.00513.43
7.3.310.0030.00516.38
7.3.300.0030.00316.28
7.3.290.0070.01316.43
7.3.280.0090.00916.43
7.3.270.0060.01217.40
7.3.260.0180.00416.43
7.3.250.0100.00816.61
7.3.240.0120.00616.41
7.3.230.0110.00616.41
7.3.210.0120.00816.42
7.3.200.0090.01219.39
7.3.190.0060.00916.44
7.3.180.0110.01016.43
7.3.170.0110.00616.53
7.3.160.0030.01316.44
7.3.120.0080.00715.07
7.3.110.0070.01114.79
7.3.100.0030.00614.89
7.3.90.0100.00715.14
7.3.80.0060.00314.89
7.3.70.0030.01014.95
7.3.60.0030.01014.95
7.3.50.0070.01014.86
7.3.40.0030.00714.83
7.3.30.0120.00014.89
7.3.20.0090.00616.55
7.3.10.0070.00316.71
7.3.00.0000.01516.93
7.2.330.0090.00816.58
7.2.320.0080.00816.54
7.2.310.0090.01316.64
7.2.300.0090.01216.76
7.2.290.0090.01316.72
7.2.250.0090.00915.10
7.2.240.0030.01714.95
7.2.230.0070.01015.30
7.2.220.0110.00314.94
7.2.210.0030.01015.13
7.2.200.0070.01115.02
7.2.190.0000.01515.12
7.2.180.0070.00715.15
7.2.170.0080.00714.79
7.2.00.0060.00619.42
7.1.330.0100.00716.02
7.1.320.0060.00615.39
7.1.310.0090.00315.54
7.1.300.0110.00315.66
7.1.290.0080.00315.82
7.1.280.0090.00615.57
7.1.270.0060.00315.85
7.1.260.0100.00615.78
7.1.100.0070.00717.67
7.1.70.0040.00416.87
7.1.60.0070.00719.46
7.1.50.0040.01816.93
7.1.00.0070.07322.43
7.0.200.0030.00716.79
7.0.140.0000.07722.05
7.0.60.0000.05320.08
7.0.50.0130.07317.85
7.0.40.0130.05720.30
7.0.30.0230.08020.12
7.0.20.0200.04320.09
7.0.10.0030.05320.21
7.0.00.0130.08020.10
5.6.280.0000.07721.07
5.6.210.0130.07320.57
5.6.200.0100.07718.23
5.6.190.0100.03720.67
5.6.180.0470.05720.77
5.6.170.0200.05020.44
5.6.160.0130.07720.45
5.6.150.0070.08018.15
5.6.140.0130.08018.19
5.6.130.0030.06318.29
5.6.120.0130.06320.99
5.6.110.0030.08721.03
5.6.100.0070.08021.09
5.6.90.0070.07321.11
5.6.80.0000.04320.38
5.5.350.0270.04720.50
5.5.340.0130.07317.92
5.5.330.0030.07320.30
5.5.320.0070.06320.36
5.5.310.0300.04020.34
5.5.300.0030.04318.09
5.5.290.0070.08018.09
5.5.280.0100.08320.65
5.5.270.0100.08720.87
5.5.260.0070.08320.87
5.5.250.0100.08320.58
5.5.240.0070.07020.19
5.4.450.0400.07719.48
5.4.440.0500.06019.27
5.4.430.0270.04319.63
5.4.420.0400.07019.31
5.4.410.0230.05019.05
5.4.400.0330.03319.07
5.4.390.0470.03019.22
5.4.380.0400.06718.99
5.4.370.0400.06719.20
5.4.360.0330.04719.25
5.4.350.0570.03019.08
5.4.340.0300.05718.84
5.4.320.0230.05319.20
5.4.310.0330.04319.19
5.4.300.0370.07018.98
5.4.290.0400.06319.22
5.4.280.0400.05719.09
5.4.270.0330.07019.19
5.4.260.0330.07719.08
5.4.250.0300.04019.30
5.4.240.0330.05319.07
5.4.230.0400.04018.85
5.4.220.0370.05719.04
5.4.210.0330.05018.96
5.4.200.0400.06019.08
5.4.190.0370.07318.86
5.4.180.0270.04018.97
5.4.170.0300.04019.23
5.4.160.0370.05718.96
5.4.150.0330.06719.07
5.4.140.0330.07316.35
5.4.130.0400.03716.29
5.4.120.0330.06716.50
5.4.110.0370.06716.54
5.4.100.0300.03716.52
5.4.90.0300.03316.35
5.4.80.0300.03716.39
5.4.70.0470.04716.17
5.4.60.0330.03316.49
5.4.50.0300.04016.48
5.4.40.0370.06316.51
5.4.30.0370.04016.47
5.4.20.0270.07316.18
5.4.10.0370.05016.55
5.4.00.0370.06015.80
5.3.290.0330.04314.66
5.3.280.0270.04014.57
5.3.270.0370.07014.60
5.3.260.0330.07314.52
5.3.250.0370.04714.50
5.3.240.0370.04714.69
5.3.230.0330.04714.61
5.3.220.0400.07314.55
5.3.210.0470.05714.47
5.3.200.0300.04314.64
5.3.190.0430.05714.78
5.3.180.0430.03714.68
5.3.170.0430.03714.56
5.3.160.0470.06014.55
5.3.150.0370.04314.57
5.3.140.0400.06314.52
5.3.130.0400.07014.45
5.3.120.0300.05314.45
5.3.110.0500.05714.52
5.3.100.0400.06714.01
5.3.90.0400.06313.93
5.3.80.0400.06714.13
5.3.70.0670.02713.91
5.3.60.0400.03714.08
5.3.50.0230.04313.85
5.3.40.0230.03713.86
5.3.30.0230.03714.02
5.3.20.0300.03713.59
5.3.10.0270.03013.70
5.3.00.0230.03313.54
5.2.170.0200.03011.97
5.2.160.0200.03011.97
5.2.150.0230.03311.97
5.2.140.0230.03011.97
5.2.130.0230.02711.97
5.2.120.0270.02711.97
5.2.110.0230.02711.97
5.2.100.0200.02711.97
5.2.90.0230.02711.97
5.2.80.0270.02011.97
5.2.70.0300.05311.97
5.2.60.0200.02711.97
5.2.50.0170.03311.97
5.2.40.0200.02311.97
5.2.30.0130.03011.97
5.2.20.0130.03311.97
5.2.10.0170.02711.97
5.2.00.0130.03011.97
5.1.60.0230.03011.97
5.1.50.0170.03011.97
5.1.40.0170.02311.97
5.1.30.0170.03011.97
5.1.20.0200.02711.97
5.1.10.0170.02311.97
5.1.00.0130.02711.97
5.0.50.0070.02011.97
5.0.40.0070.02011.97
5.0.30.0100.02711.97
5.0.20.0100.01711.97
5.0.10.0070.02011.97
5.0.00.0070.03011.97
4.4.90.0130.02711.97
4.4.80.0070.02011.97
4.4.70.0070.01311.97
4.4.60.0070.01711.97
4.4.50.0100.01311.97
4.4.40.0070.02311.97
4.4.30.0100.01311.97
4.4.20.0070.01711.97
4.4.10.0100.01311.97
4.4.00.0070.02311.97
4.3.110.0100.01311.97
4.3.100.0070.01711.97
4.3.90.0100.01311.97
4.3.80.0030.02711.97
4.3.70.0070.01311.97
4.3.60.0070.01311.97
4.3.50.0070.01711.97
4.3.40.0100.02711.97
4.3.30.0070.01311.97
4.3.20.0030.01711.97
4.3.10.0000.01711.97
4.3.00.0030.01711.97

preferences:
49.67 ms | 401 KiB | 5 Q