3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doesNotMatter = ['a' => ['id' => 1], 'b' => ['id' => 2]]; $copy1 = $doesNotMatter; $reference = &$doesNotMatter['a']; $copy2 = $doesNotMatter; // Not a reference! var_dump($doesNotMatter); $copy1['a'] = null; $copy2['b'] = null; var_dump($doesNotMatter); $copy2['a'] = null; $copy2['b'] = null; // Intuitively, this should be a copy of $doesNotMatter and shouldn't affect it at all, but because a // reference exists to $doesNotMatter['a'] when $copy2 is created, that key is copied as a reference. // Basically, when a reference is created, PHP treats both the reference and the original as references, // and this affects object properties and array keys in unintuitive ways. var_dump($doesNotMatter);

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.0110.01122.86
8.4.150.0020.00014.05
8.4.140.0110.01217.25
8.4.130.0120.00718.95
8.4.120.0110.00624.16
8.4.110.0140.00617.81
8.4.100.0130.00819.04
8.4.90.0070.00720.61
8.4.80.0070.00918.83
8.4.70.0080.00917.80
8.4.60.0110.00918.84
8.4.50.0130.01018.70
8.4.40.0060.01119.49
8.4.30.0140.00720.61
8.4.20.0130.00917.85
8.4.10.0030.01321.75
8.3.280.0110.00920.76
8.3.270.0140.00816.54
8.3.260.0110.01016.56
8.3.250.0100.00818.62
8.3.240.0070.00716.97
8.3.230.0100.00916.26
8.3.220.0110.00818.86
8.3.210.0090.00916.70
8.3.200.0050.00316.63
8.3.190.0040.00617.21
8.3.180.0040.00617.04
8.3.170.0070.01120.47
8.3.160.0070.00718.60
8.3.150.0090.00917.10
8.3.140.0040.00816.52
8.3.130.0080.00018.25
8.3.120.0030.00618.98
8.3.110.0050.00216.50
8.3.100.0000.00824.06
8.3.90.0050.00326.77
8.3.80.0040.00418.43
8.3.70.0070.01316.58
8.3.60.0160.00316.75
8.3.50.0140.00020.14
8.3.40.0170.00322.08
8.3.30.0110.00418.67
8.3.20.0050.00324.18
8.3.10.0000.00724.66
8.3.00.0060.00326.16
8.2.290.0040.00420.59
8.2.280.0090.00718.41
8.2.270.0090.00917.25
8.2.260.0140.00716.43
8.2.250.0110.00716.42
8.2.240.0040.00417.08
8.2.230.0060.00320.94
8.2.220.0080.00037.54
8.2.210.0040.00426.77
8.2.200.0060.00316.62
8.2.190.0030.01016.58
8.2.180.0070.00725.92
8.2.170.0120.00318.96
8.2.160.0040.01122.96
8.2.150.0070.00325.66
8.2.140.0050.00224.66
8.2.130.0050.00326.16
8.2.120.0040.00421.07
8.2.110.0060.00319.33
8.2.100.0040.00817.78
8.2.90.0000.00817.64
8.2.80.0030.00617.97
8.2.70.0050.00717.35
8.2.60.0060.00317.93
8.2.50.0090.00018.07
8.2.40.0060.01117.72
8.2.30.0040.00418.08
8.2.20.0050.00320.46
8.2.10.0040.00418.07
8.2.00.0040.00419.17
8.1.330.0130.00521.97
8.1.320.0120.00816.27
8.1.310.0110.00416.17
8.1.300.0070.01118.50
8.1.290.0040.00430.84
8.1.280.0130.00925.92
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0080.00423.69
8.1.230.0030.00920.91
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0000.00818.46
8.1.160.0050.00318.79
8.1.150.0000.00818.57
8.1.140.0000.00717.46
8.1.130.0000.00718.80
8.1.120.0030.00417.30
8.1.110.0040.00417.28
8.1.100.0040.00417.40
8.1.90.0040.00417.38
8.1.80.0050.00617.33
8.1.70.0080.00317.34
8.1.60.0110.00317.55
8.1.50.0090.00417.41
8.1.40.0090.00417.39
8.1.30.0070.00517.52
8.1.20.0090.00417.48
8.1.10.0050.00717.32
8.1.00.0120.00317.27
8.0.300.0050.00219.98
8.0.290.0000.00716.63
8.0.280.0000.00718.38
8.0.270.0050.00316.79
8.0.260.0060.00018.40
8.0.250.0000.00716.88
8.0.240.0060.00016.85
8.0.230.0000.00816.85
8.0.220.0070.00016.82
8.0.210.0090.00416.65
8.0.200.0090.00316.63
8.0.190.0070.00516.54
8.0.180.0060.00716.66
8.0.170.0070.00616.70
8.0.160.0100.00416.62
8.0.150.0090.00516.61
8.0.140.0060.00716.53
8.0.130.0080.00716.68
8.0.120.0130.00316.54
8.0.110.0100.00416.74
8.0.100.0090.00516.69
8.0.90.0080.00516.79
8.0.80.0060.00816.74
8.0.70.0090.00616.72
8.0.60.0130.00216.63
8.0.50.0070.00816.63
8.0.30.0110.00416.81
8.0.20.0030.01216.75
8.0.10.0100.00616.79
7.4.330.0000.00615.55
7.4.320.0000.00616.44
7.4.300.0080.00716.22
7.4.290.0100.00616.33
7.4.280.0080.00416.25
7.4.270.0080.00916.42
7.4.260.0080.00716.34
7.4.250.0090.00616.50
7.4.240.0100.00516.32
7.4.230.0070.00816.42
7.4.220.0120.00216.30
7.4.210.0090.00516.44
7.4.200.0100.00516.27
7.4.190.0040.00916.19
7.4.180.0060.00716.49
7.4.160.0110.00216.13
7.4.150.0100.00316.29
7.4.140.0100.00216.42
7.4.130.0120.00316.10
7.4.120.0080.00616.17
7.4.110.0100.00316.14
7.4.100.0090.00416.35
7.4.90.0100.00216.29
7.4.80.0060.00516.18
7.4.70.0060.00416.30
7.4.60.0060.00516.11
7.4.50.0040.00516.26
7.4.40.0040.00616.20
7.4.30.0060.00416.21
7.4.20.0070.00216.22
7.4.10.0040.00616.41
7.4.00.0070.00416.20

preferences:
135.71 ms | 403 KiB | 5 Q