3v4l.org

run code in 300+ PHP versions simultaneously
<?phpclass C { const ONE = 1; public $array = [ self::ONE => 'foo', 'bar', 'quux', ];}var_dump((new C)->array);

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.00618.30
8.3.50.0230.00922.94
8.3.40.0040.01118.67
8.3.30.0140.00018.97
8.3.20.0000.00720.37
8.3.10.0080.00023.70
8.3.00.0050.00319.15
8.2.180.0080.00816.32
8.2.170.0070.00722.96
8.2.160.0120.00320.35
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0120.00326.16
8.2.120.0000.00721.12
8.2.110.0030.00622.29
8.2.100.0080.00317.59
8.2.90.0060.00319.05
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0050.00217.80
8.2.50.0040.00418.07
8.2.40.0030.00518.22
8.2.30.0000.00717.90
8.2.20.0000.00717.48
8.2.10.0000.00717.90
8.2.00.0000.00717.53
8.1.280.0120.00325.92
8.1.270.0060.00323.70
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0030.00617.23
8.1.230.0110.00019.11
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0000.00817.13
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0000.00718.46
8.1.160.0020.00521.98
8.1.150.0000.00818.62
8.1.140.0050.00517.18
8.1.130.0000.00717.66
8.1.120.0070.00017.30
8.1.110.0000.00717.32
8.1.100.0050.00217.33
8.1.90.0040.00417.33
8.1.80.0020.00517.19
8.1.70.0030.00317.17
8.1.60.0030.00517.45
8.1.50.0080.00017.28
8.1.40.0050.00217.33
8.1.30.0040.00417.43
8.1.20.0040.00417.35
8.1.10.0040.00417.40
8.1.00.0060.00317.38
8.0.300.0060.00318.77
8.0.290.0050.00216.75
8.0.280.0030.00318.37
8.0.270.0040.00417.09
8.0.260.0060.00017.18
8.0.250.0030.00316.80
8.0.240.0000.00816.68
8.0.230.0030.00316.72
8.0.220.0000.00716.65
8.0.210.0000.00716.58
8.0.200.0000.00716.69
8.0.190.0000.00716.83
8.0.180.0040.00416.76
8.0.170.0000.00716.75
8.0.160.0050.00216.64
8.0.150.0070.00016.64
8.0.140.0030.00416.70
8.0.130.0030.00613.46
8.0.120.0030.00516.77
8.0.110.0040.00416.74
8.0.100.0030.00516.57
8.0.90.0040.00416.62
8.0.80.0100.00716.78
8.0.70.0040.00416.69
8.0.60.0040.00416.86
8.0.50.0030.00516.79
8.0.30.0090.01016.88
8.0.20.0110.00817.40
8.0.10.0050.00316.91
8.0.00.0090.00916.64
7.4.330.0050.00015.07
7.4.320.0030.00316.46
7.4.300.0030.00316.46
7.4.290.0030.00316.38
7.4.280.0050.00316.25
7.4.270.0000.00716.39
7.4.260.0000.00716.49
7.4.250.0040.00416.46
7.4.240.0000.00716.41
7.4.230.0030.00316.36
7.4.220.0110.00816.35
7.4.210.0000.01516.57
7.4.200.0060.00016.54
7.4.160.0130.00316.53
7.4.150.0030.01417.40
7.4.140.0140.01117.86
7.4.130.0120.00516.25
7.4.120.0140.00416.28
7.4.110.0130.00316.41
7.4.100.0060.01016.34
7.4.90.0100.00716.38
7.4.80.0070.01119.39
7.4.70.0030.01416.52
7.4.60.0090.00916.51
7.4.50.0080.00016.08
7.4.40.0120.00416.37
7.4.30.0070.01016.46
7.3.330.0040.00313.23
7.3.320.0000.00613.28
7.3.310.0000.00716.21
7.3.300.0000.00816.17
7.3.290.0000.01316.11
7.3.280.0050.00916.23
7.3.270.0070.01017.40
7.3.260.0060.01016.21
7.3.250.0110.00616.31
7.3.240.0060.00916.13
7.3.230.0130.00316.39
7.3.210.0030.01416.29
7.3.200.0070.01419.39
7.3.190.0090.00616.39
7.3.180.0120.00316.13
7.3.170.0120.00916.27
7.3.160.0170.00016.21
7.2.330.0090.01216.30
7.2.320.0040.01216.50
7.2.310.0110.00916.61
7.2.300.0160.00016.27
7.2.290.0030.01316.30
5.4.320.0070.03512.45
5.4.310.0060.03712.45
5.4.300.0050.03612.45
5.4.290.0060.03712.45
5.4.280.0030.03812.34
5.4.270.0070.03412.34
5.4.260.0080.03412.34
5.4.250.0020.04012.35
5.4.240.0060.03512.35
5.4.230.0060.04012.34
5.4.220.0060.03512.34
5.4.210.0040.04312.34
5.4.200.0050.04612.34
5.4.190.0060.03512.34
5.4.180.0020.03912.33
5.4.170.0050.03712.35
5.4.160.0070.03612.34
5.4.150.0050.03712.34
5.4.140.0090.03412.02
5.4.130.0090.03212.01
5.4.120.0070.05011.96
5.4.110.0090.04511.96
5.4.100.0080.03411.96
5.4.90.0080.03511.96
5.4.80.0040.03911.96
5.4.70.0100.03411.96
5.4.60.0040.04111.96
5.4.50.0090.03311.96
5.4.40.0070.03311.95
5.4.30.0060.03511.95
5.4.20.0070.03511.94
5.4.10.0050.03611.94
5.4.00.0070.03611.43

preferences:
34.55 ms | 401 KiB | 5 Q