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.0090.00616.88
8.3.50.0130.00318.17
8.3.40.0110.00418.88
8.3.30.0070.00718.92
8.3.20.0080.00020.47
8.3.10.0040.00423.58
8.3.00.0050.00319.97
8.2.180.0090.00618.54
8.2.170.0100.00722.96
8.2.160.0040.01620.41
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0060.00321.16
8.2.120.0040.00426.35
8.2.110.0030.00620.50
8.2.100.0090.00318.09
8.2.90.0050.00319.04
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0050.00321.24
8.2.30.0040.00420.66
8.2.20.0070.00018.06
8.2.10.0000.00818.06
8.2.00.0050.00318.13
8.1.280.0030.01025.92
8.1.270.0040.00420.37
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0030.00722.18
8.1.230.0080.00417.70
8.1.220.0030.00617.89
8.1.210.0060.00318.77
8.1.200.0030.00617.48
8.1.190.0050.00317.25
8.1.180.0040.00418.10
8.1.170.0040.00418.62
8.1.160.0000.00720.88
8.1.150.0000.00718.99
8.1.140.0030.00519.61
8.1.130.0030.00517.82
8.1.120.0040.00417.59
8.1.110.0080.00017.67
8.1.100.0000.00817.56
8.1.90.0040.00417.63
8.1.80.0040.00417.51
8.1.70.0080.00017.70
8.1.60.0030.00617.83
8.1.50.0090.00017.70
8.1.40.0030.00617.77
8.1.30.0050.00317.84
8.1.20.0000.00817.73
8.1.10.0000.00717.80
8.1.00.0040.00717.70
8.0.300.0000.00718.77
8.0.290.0040.00417.00
8.0.280.0030.00318.50
8.0.270.0070.00017.35
8.0.260.0030.00317.39
8.0.250.0030.00317.11
8.0.240.0000.00817.18
8.0.230.0060.00317.21
8.0.220.0000.00717.19
8.0.210.0040.00417.06
8.0.200.0000.00617.05
8.0.190.0080.00017.18
8.0.180.0000.00717.00
8.0.170.0080.00017.16
8.0.160.0030.00317.21
8.0.150.0000.00717.10
8.0.140.0070.00017.07
8.0.130.0030.00513.46
8.0.120.0030.00617.11
8.0.110.0050.00217.04
8.0.100.0070.00016.96
8.0.90.0000.00717.13
8.0.80.0060.01517.01
8.0.70.0050.00216.98
8.0.60.0050.00317.11
8.0.50.0040.00416.98
8.0.30.0080.01017.45
8.0.20.0090.01217.40
8.0.10.0040.00417.28
8.0.00.0110.00817.03
7.4.330.0000.00516.72
7.4.320.0030.00316.75
7.4.300.0000.00616.72
7.4.290.0040.00416.78
7.4.280.0050.00316.68
7.4.270.0000.00716.78
7.4.260.0030.00316.78
7.4.250.0040.00416.77
7.4.240.0040.00316.79
7.4.230.0030.00316.74
7.4.220.0100.01616.80
7.4.210.0110.00716.76
7.4.200.0030.00316.68
7.4.160.0090.00616.62
7.4.150.0060.01217.40
7.4.140.0110.00817.86
7.4.130.0130.00616.67
7.4.120.0110.00816.73
7.4.110.0100.00716.68
7.4.100.0030.01316.70
7.4.90.0170.00016.82
7.4.80.0070.01219.39
7.4.70.0060.01016.77
7.4.60.0040.01216.66
7.4.50.0060.00916.44
7.4.40.0110.00616.88
7.4.30.0130.00616.85
7.4.00.0040.01215.16
7.3.330.0030.00313.23
7.3.320.0000.00713.30
7.3.310.0060.00316.39
7.3.300.0070.00016.34
7.3.290.0100.00716.41
7.3.280.0110.00716.47
7.3.270.0100.00717.40
7.3.260.0110.00716.71
7.3.250.0080.01216.49
7.3.240.0140.00416.43
7.3.230.0090.00916.57
7.3.210.0070.01316.61
7.3.200.0090.01416.39
7.3.190.0150.00416.70
7.3.180.0140.00316.58
7.3.170.0140.00416.48
7.3.160.0060.00916.77
7.3.120.0070.01314.88
7.3.110.0070.01115.06
7.3.100.0060.00615.06
7.3.90.0000.00915.06
7.3.80.0000.01514.96
7.3.70.0030.00614.91
7.3.60.0030.01614.64
7.3.50.0090.00614.93
7.3.40.0060.00615.02
7.3.30.0040.00815.13
7.3.20.0090.00616.82
7.3.10.0070.00716.84
7.3.00.0030.01216.57
7.2.330.0060.01316.73
7.2.320.0150.00917.07
7.2.310.0070.01016.89
7.2.300.0070.01016.78
7.2.290.0140.00417.05
7.2.250.0070.01115.24
7.2.240.0100.01014.86
7.2.230.0070.01015.41
7.2.220.0040.00715.39
7.2.210.0150.00014.91
7.2.200.0030.00715.05
7.2.190.0120.00315.16
7.2.180.0090.00915.27
7.2.170.0070.00714.92
7.2.60.0090.00017.09
7.2.00.0040.01119.34
7.1.330.0040.01015.82
7.1.320.0060.00615.86
7.1.310.0070.00715.94
7.1.300.0100.00715.88
7.1.290.0070.00315.92
7.1.280.0090.00615.74
7.1.270.0070.00415.94
7.1.260.0100.00315.67
7.1.200.0100.00715.69
7.1.100.0880.01116.20
7.1.70.0080.00317.31
7.1.60.0170.00719.13
7.1.50.0070.01416.81
7.1.00.0000.07722.30
7.0.200.0080.00016.82
7.0.60.0000.09019.95
7.0.50.0000.05317.88
7.0.40.0030.05320.24
7.0.30.0230.08020.10
7.0.20.0170.04020.09
7.0.10.0030.05020.33
7.0.00.0100.04320.07
5.6.280.0000.03721.12
5.6.210.0070.05320.61
5.6.200.0000.08718.25
5.6.190.0130.04720.61
5.6.180.0070.07720.39
5.6.170.0200.04020.46
5.6.160.0000.04320.55
5.6.150.0030.05018.18
5.6.140.0100.08018.23
5.6.130.0100.07018.18
5.6.120.0030.08721.09
5.6.110.0030.05320.88
5.6.100.0030.09020.98
5.6.90.0030.06721.13
5.6.80.0100.08020.51
5.5.350.4270.03720.47
5.5.340.0030.04717.98
5.5.330.0000.04720.35
5.5.320.0530.05720.24
5.5.310.0230.07720.24
5.5.300.0070.03717.96
5.5.290.0070.04718.00
5.5.280.0100.04320.90
5.5.270.0000.04720.89
5.5.260.0030.04320.87
5.5.250.0070.08320.62
5.5.240.0230.07020.35

preferences:
39.07 ms | 401 KiB | 5 Q