3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ "id" => 54, "type" => 5, "content" => [ ["id" => 99, "type" => 516], ["id" => 88, "type" => 464], ["id" => 41, "type" => 845] ] ], [ "id" => 54, "type" => 55, "content" => [ ["id" => 54, "type" => 578], ["id" => 54, "type" => 354], ["id" => 75, "type" => 458] ] ], [ "id" => 65, "type" => 59, "content" => [ ["id" => 87, "type" => 5454], ["id" => 65, "type" => 245], ["id" => 65, "type" => 24525] ] ] ]; $id = 54; $type = 55; foreach ($array as &$row) { if ($row["id"] == $id && $row["type"] == $type) { break; } } $row['content'] = 'this has been changed'; 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.30.0110.00620.89
8.5.20.0100.00819.55
8.5.10.0090.01018.66
8.5.00.0140.00719.91
8.4.180.0140.00919.78
8.4.170.0100.01124.01
8.4.160.0120.01022.18
8.4.150.0070.00616.88
8.4.140.0150.00717.62
8.4.130.0140.00619.42
8.4.120.0080.00820.55
8.4.110.0140.00722.57
8.4.100.0140.00518.85
8.4.90.0140.00718.89
8.4.80.0070.00118.71
8.4.70.0100.00617.99
8.4.60.0100.00618.48
8.4.50.0140.00718.52
8.4.40.0120.00617.59
8.4.30.0030.01620.54
8.4.20.0170.00319.58
8.4.10.0110.00019.75
8.3.300.0090.01119.12
8.3.290.0140.00720.79
8.3.280.0150.00518.35
8.3.270.0110.00816.58
8.3.260.0120.00716.41
8.3.250.0140.00418.81
8.3.240.0110.00916.99
8.3.230.0100.00716.62
8.3.220.0110.00418.92
8.3.210.0100.00816.70
8.3.200.0060.00316.84
8.3.190.0060.00418.96
8.3.180.0050.00416.70
8.3.170.0110.00716.98
8.3.160.0080.00018.30
8.3.150.0140.00420.68
8.3.140.0080.00017.16
8.3.130.0000.00818.62
8.3.120.0040.00419.11
8.3.110.0090.00020.94
8.3.100.0030.00718.28
8.3.90.0060.00326.77
8.3.80.0040.00420.47
8.3.70.0120.00316.58
8.3.60.0080.00816.75
8.3.50.0080.00618.13
8.3.40.0110.00421.86
8.3.30.0110.00418.87
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0080.00026.16
8.2.300.0100.01018.09
8.2.290.0100.00820.30
8.2.280.0100.00818.29
8.2.270.0070.01117.39
8.2.260.0040.00416.48
8.2.250.0070.01118.40
8.2.240.0000.00818.97
8.2.230.0000.00922.58
8.2.220.0080.00024.06
8.2.210.0040.00426.77
8.2.200.0100.00316.63
8.2.190.0000.01516.63
8.2.180.0160.00025.92
8.2.170.0070.00719.08
8.2.160.0070.00722.96
8.2.150.0020.00525.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0030.00526.16
8.2.110.0080.00322.21
8.2.100.0040.00818.04
8.2.90.0040.00419.18
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0000.00818.16
8.2.50.0000.00918.07
8.2.40.0020.00518.34
8.2.30.0030.00519.46
8.2.20.0000.00720.31
8.2.10.0000.00817.71
8.2.00.0000.00719.18
8.1.340.0120.00917.59
8.1.330.0090.00821.88
8.1.320.0130.00616.01
8.1.310.0100.01020.19
8.1.300.0160.00017.76
8.1.290.0060.00330.84
8.1.280.0180.00325.92
8.1.270.0040.00423.99
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0030.00720.88
8.1.230.0090.00317.75
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0000.00917.13
8.1.180.0070.00318.10
8.1.170.0040.00718.63
8.1.160.0060.00320.31
8.1.150.0000.00718.68
8.1.140.0040.00417.45
8.1.130.0070.00018.88
8.1.120.0040.00417.43
8.1.110.0040.00417.44
8.1.100.0000.00717.51
8.1.90.0050.00317.34
8.1.80.0030.00717.36
8.1.70.0030.00317.38
8.1.60.0040.00417.55
8.1.50.0040.00417.52
8.1.40.0060.00317.53
8.1.30.0000.00917.52
8.1.20.0000.00717.71
8.1.10.0200.00417.43
8.1.00.0200.00417.32
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0040.00218.35
8.0.270.0070.00016.81
8.0.260.0030.00318.43
8.0.250.0000.00716.97
8.0.240.0070.00016.95
8.0.230.0030.00316.98
8.0.220.0000.00716.91
8.0.210.0000.00716.74
8.0.200.0040.00416.84
8.0.190.0070.00016.91
8.0.180.0040.00416.88
8.0.170.0000.00916.82
8.0.160.0040.00416.81
8.0.150.0070.00016.83
8.0.140.0170.00616.76
8.0.130.0120.00916.72
8.0.120.0180.00416.66
8.0.110.0190.00616.74
8.0.100.0230.00216.77
8.0.90.0220.00416.76
8.0.80.0200.00416.80
8.0.70.0210.00316.73
8.0.60.0210.00416.76
8.0.50.0180.00816.84
8.0.30.0140.01116.75
8.0.20.0160.00816.87
8.0.10.0140.00717.02
8.0.00.0060.00616.97
7.4.330.0000.00515.55
7.4.320.0060.00016.66
7.4.300.0030.00316.42
7.4.290.0000.00716.46
7.4.280.0040.00416.40
7.4.270.0220.00516.50
7.4.260.0270.00016.48
7.4.250.0250.00416.43
7.4.240.0220.00716.27
7.4.230.0290.00416.49
7.4.220.0230.00016.44
7.4.210.0160.00816.50
7.4.200.0150.00816.54
7.4.190.0210.00016.39
7.4.180.0200.00516.53
7.4.160.0170.00616.48
7.4.150.0120.01216.41
7.4.140.0150.00516.34
7.4.130.0190.00516.29
7.4.120.0180.00616.38
7.4.110.0230.00216.38
7.4.100.0200.00516.32
7.4.90.0190.00416.26
7.4.80.0180.00716.24
7.4.70.0210.00316.23
7.4.60.0110.01316.27
7.4.50.0220.00016.20
7.4.40.0200.00316.27
7.4.30.0180.00616.40
7.4.20.0160.00616.39
7.4.10.0160.00616.36
7.4.00.0130.00816.28
7.3.330.0220.00416.32
7.3.320.0160.01216.27
7.3.310.0130.00916.09
7.3.300.0320.00016.19
7.3.290.0170.00716.31
7.3.280.0250.00416.35
7.3.270.0170.00816.26
7.3.260.0220.00316.41
7.3.250.0110.01116.30
7.3.240.0180.00616.36
7.3.230.0090.01416.30
7.3.220.0140.00816.04
7.3.210.0200.00316.14
7.3.200.0200.00416.23
7.3.190.0250.00316.26
7.3.180.0230.00016.25
7.3.170.0230.00016.22
7.3.160.0180.00416.04
7.3.150.0150.01016.21
7.3.140.0170.00716.15
7.3.130.0230.00316.25

preferences:
60.65 ms | 1499 KiB | 5 Q