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.0110.00418.30
8.3.50.0100.00822.72
8.3.40.0160.00618.57
8.3.30.0120.00418.96
8.3.20.0100.00020.16
8.3.10.0090.00323.53
8.3.00.0060.00317.38
8.2.180.0090.00616.38
8.2.170.0110.00422.96
8.2.160.0040.01120.44
8.2.150.0110.00724.18
8.2.140.0030.00924.66
8.2.130.0030.00526.16
8.2.120.0100.00320.89
8.2.110.0060.00322.27
8.2.100.0090.00317.66
8.2.90.0040.00419.10
8.2.80.0030.00517.97
8.2.70.0080.00417.59
8.2.60.0040.00417.80
8.2.50.0000.00918.07
8.2.40.0080.00019.94
8.2.30.0040.00417.92
8.2.20.0050.00217.53
8.2.10.0020.00518.01
8.2.00.0040.00417.41
8.1.280.0160.00025.92
8.1.270.0140.00023.93
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0070.00420.86
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0040.00417.11
8.1.180.0040.00418.10
8.1.170.0030.00618.61
8.1.160.0070.00021.93
8.1.150.0040.00418.74
8.1.140.0030.00617.29
8.1.130.0000.00817.65
8.1.120.0030.00317.32
8.1.110.0040.00417.20
8.1.100.0040.00417.34
8.1.90.0060.00317.38
8.1.80.0050.00217.38
8.1.70.0070.00017.31
8.1.60.0050.00317.44
8.1.50.0040.00417.41
8.1.40.0050.00217.32
8.1.30.0000.00817.50
8.1.20.0040.00417.50
8.1.10.0000.00717.40
8.1.00.0000.00817.25
8.0.300.0040.00418.77
8.0.290.0030.00516.63
8.0.280.0080.00018.41
8.0.270.0030.00517.20
8.0.260.0060.00017.24
8.0.250.0030.00316.82
8.0.240.0060.00016.79
8.0.230.0000.00616.77
8.0.220.0070.00016.66
8.0.210.0090.00016.76
8.0.200.0000.00716.70
8.0.190.0070.00016.78
8.0.180.0040.00416.72
8.0.170.0000.00716.70
8.0.160.0030.00316.82
8.0.150.0030.00716.74
8.0.140.0060.00316.76
8.0.130.0000.00713.48
8.0.120.0070.00016.70
8.0.110.0040.00416.75
8.0.100.0070.00016.81
8.0.90.0040.00416.57
8.0.80.0070.00716.67
8.0.70.0070.00016.57
8.0.60.0000.00716.70
8.0.50.0050.00216.74
8.0.30.0080.01316.93
8.0.20.0100.00817.40
8.0.10.0040.00416.72
8.0.00.0060.01116.65
7.4.330.0000.00515.00
7.4.320.0040.00416.45
7.4.300.0030.00316.35
7.4.290.0040.00416.25
7.4.280.0080.00016.45
7.4.270.0000.00816.33
7.4.260.0000.00716.46
7.4.250.0040.00416.37
7.4.240.0050.00216.43
7.4.230.0040.00416.16
7.4.220.0130.01316.32
7.4.210.0090.00916.45
7.4.200.0020.00516.55
7.4.160.0040.01116.54
7.4.150.0070.01117.40
7.4.140.0140.01217.86
7.4.130.0080.01716.44
7.4.120.0110.00616.34
7.4.110.0130.00316.43
7.4.100.0070.01016.14
7.4.90.0100.00616.21
7.4.80.0090.00919.39
7.4.70.0060.01216.47
7.4.60.0140.00316.49
7.4.50.0050.00316.51
7.4.40.0000.01516.50
7.4.30.0050.01016.51
7.3.330.0000.00713.13
7.3.320.0030.00313.05
7.3.310.0000.00716.13
7.3.300.0020.00516.17
7.3.290.0110.00416.12
7.3.280.0040.01216.13
7.3.270.0130.00617.40
7.3.260.0120.00916.16
7.3.240.0040.01816.11
7.3.230.0060.00916.39
7.3.210.0100.00616.35
7.3.200.0110.00719.39
7.3.190.0060.01016.43
7.3.180.0130.00316.25
7.3.170.0140.00616.38
7.3.160.0040.01216.15
7.2.330.0140.00316.32
7.2.320.0070.01016.23
7.2.310.0060.01016.39
7.2.300.0120.00416.41
7.2.290.0090.01416.34
5.4.320.0070.03612.45
5.4.310.0070.04612.45
5.4.300.0070.03912.45
5.4.290.0070.04312.45
5.4.280.0100.03412.35
5.4.270.0050.03812.35
5.4.260.0090.03612.35
5.4.250.0050.04512.34
5.4.240.0070.05012.35
5.4.230.0090.04912.34
5.4.220.0090.04812.34
5.4.210.0050.04012.34
5.4.200.0060.04512.34
5.4.190.0070.04712.33
5.4.180.0070.03812.34
5.4.170.0050.03812.35
5.4.160.0040.04212.34
5.4.150.0090.03812.34
5.4.140.0120.04812.02
5.4.130.0090.04612.01
5.4.120.0050.04111.97
5.4.110.0080.03611.96
5.4.100.0070.03511.96
5.4.90.0090.03611.96
5.4.80.0070.03611.96
5.4.70.0070.03411.96
5.4.60.0060.03511.96
5.4.50.0100.03111.96
5.4.40.0080.03411.95
5.4.30.0060.03611.95
5.4.20.0080.03511.95
5.4.10.0040.03711.95
5.4.00.0070.03511.43

preferences:
37.66 ms | 401 KiB | 5 Q