3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '17' => "x", '16' => "x", '15' => "x", '14' => "108.7000", '13' => "x", '12' => "x", '11' => "x", '10' => "x", '09' => "108.2635", '08' => "x", '07' => "x", '06' => "x", '05' => "x", '04' => "x", '03' => "x", '02' => "x", '01' => "x", '00' => "x", '23' => "x", '22' => "x", '21' => "x", '20' => "x", '19' => "x", '18' => "x" ]; foreach ($array as $k => $v) { if ($v === 'x') { $array[$k] =& $ref; } else { if (isset($ref)) { unset($ref); } $ref = $v; } } var_export($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.5.00.0140.00820.05
8.4.150.0030.00014.05
8.4.140.0130.00817.40
8.4.130.0120.00717.73
8.4.120.0110.00920.64
8.4.110.0060.00418.81
8.4.100.0090.00317.84
8.4.90.0120.00917.73
8.4.80.0150.00517.70
8.4.70.0140.00618.00
8.4.60.0040.00518.11
8.4.50.0070.00320.61
8.4.40.0160.00317.66
8.4.30.0130.00324.02
8.4.20.0100.00619.38
8.4.10.0080.00019.26
8.3.280.0020.00114.05
8.3.270.0140.00516.52
8.3.260.0130.00716.76
8.3.250.0060.00319.21
8.3.240.0110.00816.51
8.3.230.0120.00616.91
8.3.220.0060.00117.36
8.3.210.0130.00716.81
8.3.200.0100.00916.43
8.3.190.0120.00817.20
8.3.180.0080.01019.18
8.3.170.0000.00818.90
8.3.160.0110.01118.50
8.3.150.0060.00318.82
8.3.140.0160.00318.80
8.3.130.0070.00716.48
8.3.120.0120.00818.44
8.3.110.0350.00616.54
8.3.100.0420.00616.20
8.3.90.0380.01016.28
8.3.80.0450.00416.21
8.3.70.0350.01216.67
8.3.60.0370.00616.41
8.3.50.0440.00316.49
8.3.40.0250.00617.53
8.3.30.0240.01417.40
8.3.20.0400.01117.08
8.3.10.0330.00717.59
8.3.00.0060.01617.60
8.2.290.0130.00620.21
8.2.280.0030.00616.95
8.2.270.0150.00418.47
8.2.260.0000.00816.92
8.2.250.0060.00316.61
8.2.240.0280.01316.21
8.2.230.0340.01516.64
8.2.220.0310.00816.12
8.2.210.0330.00016.30
8.2.200.0260.01116.27
8.2.190.0360.00316.45
8.2.180.0210.01816.45
8.2.170.0360.00617.62
8.2.160.0350.00817.77
8.2.150.0360.00617.48
8.2.140.0340.00317.28
8.2.130.0390.00417.39
8.2.120.0320.01117.68
8.2.110.0310.01017.68
8.2.100.0330.00017.61
8.2.90.0260.00817.56
8.2.80.0320.00917.34
8.2.70.0320.01017.38
8.2.60.0310.00917.53
8.2.50.0380.00317.41
8.2.40.0270.01217.55
8.2.30.0340.00417.27
8.2.20.0220.01617.30
8.2.10.0260.01317.28
8.2.00.0260.01117.39
8.1.330.0080.01116.73
8.1.320.0110.00717.74
8.1.310.0070.00718.38
8.1.300.0250.01415.95
8.1.290.0290.01216.09
8.1.280.0440.00715.90
8.1.270.0480.00317.08
8.1.260.0340.00817.21
8.1.250.0260.01016.99
8.1.240.0240.00817.31
8.1.230.0280.00617.38
8.1.220.0250.00717.30
8.1.210.0300.00017.05
8.1.200.0280.00717.04
8.1.190.0150.01017.22
8.1.180.0220.00617.09
8.1.170.0260.00717.16
8.1.160.0180.01517.22
8.1.150.0310.00317.28
8.1.140.0250.01117.09
8.1.130.0340.00316.91
8.1.120.0310.00617.25
8.1.110.0270.00917.17
8.1.100.0360.00017.20
8.1.90.0290.00717.03
8.1.80.0340.00417.25
8.1.70.0340.00317.16
8.1.60.0390.00317.30
8.1.50.0370.00717.13
8.1.40.0340.00617.32
8.1.30.0360.00417.34
8.1.20.0310.00917.36
8.1.10.0400.00017.25
8.1.00.0290.01317.11

preferences:
68.05 ms | 403 KiB | 5 Q