3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'color' => 'red', 'taste' => 'sweet', 'shape' => 'round', 'name' => 'apple' ]; $a += ['myKey' => 'foo']; // this is added because the key doesn't exist $a += ['shape' => 'bar']; // this is ignored because the already key exists $a += ['zero']; // this is added because the 0 key doesn't exist $a += ['not zero']; // this is ignored because the 0 key already exists var_export($a);

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.120.0110.00822.33
8.4.110.0120.00824.00
8.4.100.0140.00717.48
8.4.90.0130.00620.47
8.4.80.0050.00318.93
8.4.70.0110.01017.46
8.4.60.0100.01018.61
8.4.50.0120.00818.37
8.4.40.0160.00317.46
8.4.30.0100.01018.63
8.4.20.0140.00721.26
8.4.10.0480.00017.45
8.3.250.0100.00718.67
8.3.240.0080.00816.60
8.3.230.0110.00816.70
8.3.220.0100.00418.98
8.3.210.0160.00316.20
8.3.200.0030.00616.64
8.3.190.0040.00417.13
8.3.180.0050.00316.29
8.3.170.0060.00317.11
8.3.160.0110.00720.83
8.3.150.0110.00716.99
8.3.140.0310.01516.58
8.3.130.0320.00716.29
8.3.120.0270.00916.35
8.3.110.0270.01316.55
8.3.100.0420.00316.24
8.3.90.0360.01016.48
8.3.80.0370.00716.35
8.3.70.0260.01116.14
8.3.60.0390.00316.52
8.3.50.0350.00916.44
8.3.40.0390.00717.27
8.3.30.0250.01117.28
8.3.20.0330.00817.22
8.3.10.0210.00917.31
8.3.00.0090.00917.29
8.2.290.0110.00716.47
8.2.280.0100.00818.55
8.2.270.0090.00916.70
8.2.260.0360.00316.41
8.2.250.0350.00316.21
8.2.240.0230.01216.29
8.2.230.0170.00016.55
8.2.220.0210.00416.39
8.2.210.0210.00516.23
8.2.200.0300.00716.50
8.2.190.0310.00816.33
8.2.180.0240.01516.62
8.2.170.0340.01017.56
8.2.160.0400.00417.31
8.2.150.0300.00717.42
8.2.140.0290.00517.30
8.2.130.0230.00317.57
8.2.120.0150.00417.55
8.2.110.0220.00317.64
8.2.100.0150.00917.33
8.2.90.0260.00617.51
8.2.80.0350.00417.35
8.2.70.0290.01017.61
8.2.60.0350.00317.52
8.2.50.0310.00717.06
8.2.40.0240.01217.46
8.2.30.0290.00817.46
8.2.20.0270.01217.34
8.2.10.0280.01417.23
8.2.00.0320.00717.23
8.1.320.0120.00716.04

preferences:
38.27 ms | 403 KiB | 5 Q