3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp1 = ['foo' => [['a' => 'a1Value', 'b' => 'b1Value'], ['a' => 'a1Value', 'b' => 'b1Value']]]; $tmp2 = ['foo' => [['a' => 'a1Value', 'b' => 'b1Value'], ['a' => 'a1Value', 'b' => 'b1Value']]]; foreach ($tmp1['foo'] as &$v) { unset($v['b']); } foreach ($tmp2['foo'] ?? [] as &$v) { unset($v['b']); } var_dump($tmp1); var_dump($tmp2);

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.4.140.0120.01017.30
8.4.130.0110.00717.46
8.4.120.0140.00622.08
8.4.110.0070.00218.71
8.4.100.0100.01017.67
8.4.90.0120.00917.38
8.4.80.0050.00317.71
8.4.70.0090.00717.85
8.4.60.0130.00917.61
8.4.50.0110.01118.56
8.4.40.0130.00717.63
8.4.30.0110.00818.59
8.4.20.0220.00717.62
8.4.10.0200.00917.59
8.3.270.0080.01216.67
8.3.260.0070.00116.63
8.3.250.0090.00919.20
8.3.240.0120.00716.41
8.3.230.0060.00416.49
8.3.220.0110.00817.32
8.3.210.0090.00916.57
8.3.200.0110.00816.59
8.3.190.0120.00717.32
8.3.180.0120.00719.04
8.3.170.0060.01317.04
8.3.160.0200.00916.63
8.3.150.0230.00816.42
8.3.140.0180.01016.45
8.3.130.0240.00516.58
8.3.120.0210.00716.43
8.3.110.0230.00316.38
8.3.100.0220.00816.58
8.3.90.0180.01116.33
8.3.80.0260.00316.41
8.3.70.0230.00516.28
8.3.60.0190.00916.63
8.3.50.0170.00916.54
8.3.40.0160.00717.40
8.3.30.0110.00517.37
8.3.20.0230.00317.27
8.3.10.0180.01017.53
8.3.00.0100.00617.44
8.2.290.0030.00520.51
8.2.280.0100.01018.46
8.2.270.0160.01016.79
8.2.260.0190.00216.42
8.2.250.0220.00316.33
8.2.240.0180.00816.38
8.2.230.0190.00916.24
8.2.220.0230.00416.28
8.2.210.0210.00616.19
8.2.200.0200.00616.43
8.2.190.0150.01216.62
8.2.180.0160.00916.24
8.2.170.0180.00917.33
8.2.160.0250.00317.49
8.2.150.0250.00517.39
8.2.140.0260.00617.48
8.2.130.0250.00517.44
8.2.120.0210.00617.41
8.2.110.0190.00917.26
8.2.100.0230.00717.16
8.2.90.0190.00817.71
8.2.80.0280.00017.44
8.2.70.0240.00617.36
8.2.60.0250.00317.45
8.2.50.0240.00317.31
8.2.40.0210.00817.45
8.2.30.0210.00717.52
8.2.20.0150.00917.51
8.2.10.0180.00817.38
8.2.00.0200.00717.32
8.1.320.0110.00916.07

preferences:
29.48 ms | 403 KiB | 5 Q