3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(getMonth(null)); echo ''; print_r(getQuarter(null)); function getMonth($d) { return dtf($d,'n'); } function getQuarter($d) { return ceil( getMonth($d) / 3); } function dtf($date, $format = 'd.m.Y'){ $date = new DateTime($date); return $date->format($format); }

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.0060.00916.88
8.3.50.0070.01322.05
8.3.40.0170.00319.16
8.3.30.0040.01218.77
8.3.20.0070.00020.38
8.3.10.0080.00023.73
8.3.00.0040.00419.98
8.2.180.0150.00018.79
8.2.170.0110.01122.96
8.2.160.0110.00420.34
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0000.00821.00
8.2.120.0040.00426.35
8.2.110.0060.00320.47
8.2.100.0040.00818.18
8.2.90.0080.00019.09
8.2.80.0090.00018.00
8.2.70.0040.00417.75
8.2.60.0040.00418.05
8.2.50.0060.00318.07
8.2.40.0050.00321.17
8.2.30.0000.00720.73
8.2.20.0040.00418.01
8.2.10.0040.00418.10
8.2.00.0000.00718.20
8.1.280.0030.01025.92
8.1.270.0090.00020.37
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00622.11
8.1.230.0060.00617.91
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0090.00017.60
8.1.190.0000.00817.60
8.1.180.0090.00018.10
8.1.170.0050.00318.60
8.1.160.0040.00420.82
8.1.150.0040.00418.97
8.1.140.0030.00619.56
8.1.130.0030.00317.68
8.1.120.0000.00717.55
8.1.110.0000.00717.64
8.1.100.0030.00617.67
8.1.90.0000.00717.64
8.1.80.0000.00817.64
8.1.70.0000.00717.53
8.1.60.0040.00417.68
8.1.50.0000.00817.76
8.1.40.0040.00417.70
8.1.30.0000.00817.89
8.1.20.0000.00817.87
8.1.10.0000.00717.77
8.1.00.0110.00017.73
8.0.300.0000.00818.77
8.0.290.0040.00417.00
8.0.280.0000.00718.64
8.0.270.0070.00017.46
8.0.260.0030.00317.37
8.0.250.0000.00717.23
8.0.240.0040.00417.11
8.0.230.0030.00617.19
8.0.220.0050.00317.15
8.0.210.0000.00717.16
8.0.200.0000.00717.20
8.0.190.0050.00317.18
8.0.180.0070.00017.09
8.0.170.0040.00417.15
8.0.160.0000.00717.17
8.0.150.0050.00316.92
8.0.140.0040.00417.07
8.0.130.0030.00313.48
8.0.120.0030.00517.09
8.0.110.0050.00317.06
8.0.100.0000.00716.96
8.0.90.0020.00516.98
8.0.80.0040.01817.06
8.0.70.0030.00516.98
8.0.60.0040.00417.21
8.0.50.0000.00716.96
8.0.30.0120.01017.31
8.0.20.0130.00617.52
8.0.10.0000.00817.15
8.0.00.0080.01017.00
7.4.330.0050.00016.84
7.4.320.0040.00416.64
7.4.300.0030.00316.75
7.4.290.0000.00716.81
7.4.280.0040.00416.71
7.4.270.0030.00316.82
7.4.260.0030.00316.71
7.4.250.0080.00016.70
7.4.240.0070.00016.69
7.4.230.0040.00416.83
7.4.220.0140.00716.91
7.4.210.0060.00916.92
7.4.200.0070.00016.73
7.4.160.0090.00616.58
7.4.150.0090.00917.40
7.4.140.0060.01317.86
7.4.130.0090.00916.81
7.4.120.0080.00916.73
7.4.110.0120.00816.83
7.4.100.0100.00716.60
7.4.90.0070.01016.59
7.4.80.0120.00619.39
7.4.70.0080.00816.76
7.4.60.0130.00316.73
7.4.50.0030.00916.58
7.4.40.0100.00716.82
7.4.30.0140.00416.80
7.4.00.0030.00615.29
7.3.330.0000.00613.43
7.3.320.0070.00013.39
7.3.310.0030.00316.27
7.3.300.0000.00716.40
7.3.290.0110.00516.41
7.3.280.0120.00516.41
7.3.270.0140.00317.40
7.3.260.0060.01216.69
7.3.250.0140.00616.66
7.3.240.0070.01016.64
7.3.230.0100.00716.79
7.3.210.0120.00616.79
7.3.200.0120.00416.74
7.3.190.0110.00716.80
7.3.180.0090.00616.49
7.3.170.0080.00816.79
7.3.160.0120.00416.57
7.2.330.0070.01016.63
7.2.320.0070.01616.77
7.2.310.0100.01316.67
7.2.300.0140.00316.80
7.2.290.0000.01616.72
7.2.60.0160.00016.95
7.2.00.0090.00319.65
7.1.200.0030.01015.63
7.1.100.0940.00316.20
7.1.70.0100.00017.34
7.1.60.0110.01519.13
7.1.50.0070.01016.82
7.1.00.0070.07322.35
7.0.200.0000.01017.01
7.0.60.0030.06719.92
7.0.50.0070.07317.88
7.0.40.0070.08320.26
7.0.30.0300.07720.12
7.0.20.0130.04720.23
7.0.10.0030.05720.25
7.0.00.0030.04020.24
5.6.280.0030.03320.90
5.6.210.0000.08720.67
5.6.200.0130.07718.22
5.6.190.0100.08020.63
5.6.180.0030.09020.68
5.6.170.0230.03720.46
5.6.160.0000.04320.39
5.6.150.0070.08318.15
5.6.140.0070.06318.17
5.6.130.0030.06018.27
5.6.120.0030.06721.07
5.6.110.0100.07720.92
5.6.100.0030.04020.98
5.6.90.0170.08021.04
5.6.80.0030.07720.52
5.5.350.4330.04020.53
5.5.340.0130.04018.02
5.5.330.0170.07020.47
5.5.320.0530.07320.42
5.5.310.0270.04020.34
5.5.300.0130.07318.03
5.5.290.0030.09018.08
5.5.280.0200.07020.77
5.5.270.0230.07020.88
5.5.260.0000.05720.88
5.5.250.0070.07020.78
5.5.240.0130.04020.25

preferences:
42.96 ms | 401 KiB | 5 Q