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) { $ref = &$row["content"]; } } $ref = '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.0100.00720.68
8.5.20.0100.00919.52
8.5.10.0100.00718.49
8.5.00.0140.00819.84
8.4.180.0110.01119.73
8.4.170.0130.01021.99
8.4.160.0130.00923.93
8.4.150.0080.00416.82
8.4.140.0130.01017.59
8.4.130.0090.01217.77
8.4.120.0120.00722.20
8.4.110.0120.00722.51
8.4.100.0140.00717.71
8.4.90.0070.00818.83
8.4.80.0080.01217.79
8.4.70.0120.00817.70
8.4.60.0100.00918.57
8.4.50.0090.00720.46
8.4.40.0160.00317.41
8.4.30.0120.00920.29
8.4.20.0130.00717.73
8.4.10.0030.00619.58
8.3.300.0080.01218.55
8.3.290.0100.01220.70
8.3.280.0110.01018.38
8.3.270.0090.01016.80
8.3.260.0070.01216.46
8.3.250.0120.00718.84
8.3.240.0040.00416.55
8.3.230.0130.00616.54
8.3.220.0100.00817.11
8.3.210.0140.00816.55
8.3.200.0120.00716.86
8.3.190.0030.00517.19
8.3.180.0100.00916.71
8.3.170.0110.00720.99
8.3.160.0070.01017.06
8.3.150.0120.00619.05
8.3.140.0080.00017.17
8.3.130.0000.00818.59
8.3.120.0090.00018.89
8.3.110.0030.00620.94
8.3.100.0000.00924.06
8.3.90.0030.00526.77
8.3.80.0030.00620.36
8.3.70.0080.00816.63
8.3.60.0110.01116.50
8.3.50.0110.00319.75
8.3.40.0130.00321.89
8.3.30.0140.00318.83
8.3.20.0040.00424.18
8.3.10.0030.00524.66
8.3.00.0070.00026.16
8.2.300.0110.00822.04
8.2.290.0130.00620.23
8.2.280.0130.00818.45
8.2.270.0070.01116.78
8.2.260.0050.00318.90
8.2.250.0160.00316.70
8.2.240.0070.01018.93
8.2.230.0070.00722.58
8.2.220.0090.00037.54
8.2.210.0040.01126.77
8.2.200.0050.00516.50
8.2.190.0060.01216.63
8.2.180.0070.01125.92
8.2.170.0110.00418.91
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0000.00821.00
8.2.110.0030.00622.07
8.2.100.0110.00017.91
8.2.90.0000.00820.42
8.2.80.0060.00317.97
8.2.70.0040.00418.05
8.2.60.0040.00418.03
8.2.50.0000.00818.10
8.2.40.0070.00018.34
8.2.30.0030.00519.52
8.2.20.0000.00720.44
8.2.10.0040.00417.75
8.2.00.0000.00819.31
8.1.340.0050.00317.57
8.1.330.0070.00321.88
8.1.320.0100.00815.95
8.1.310.0110.00316.93
8.1.300.0110.00016.22
8.1.290.0030.00618.88
8.1.280.0070.01025.92
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0030.00728.09
8.1.240.0030.00622.66
8.1.230.0090.00320.95
8.1.220.0090.00017.74
8.1.210.0030.00518.96
8.1.200.0000.00817.35
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0030.00718.61
8.1.160.0060.00320.22
8.1.150.0040.00418.58
8.1.140.0040.00417.45
8.1.130.0030.00318.80
8.1.120.0000.00717.51
8.1.110.0000.00917.44
8.1.100.0000.00717.51
8.1.90.0000.00817.46
8.1.80.0050.00517.33
8.1.70.0030.00517.37
8.1.60.0040.00417.58
8.1.50.0000.00817.53
8.1.40.0040.00417.54
8.1.30.0030.00617.58
8.1.20.0000.00817.69
8.1.10.0190.00017.48
8.1.00.0200.00317.38
8.0.300.0050.00320.02
8.0.290.0040.00416.75
8.0.280.0000.00718.31
8.0.270.0070.00016.80
8.0.260.0030.00318.44
8.0.250.0030.00316.92
8.0.240.0040.00416.93
8.0.230.0000.00716.96
8.0.220.0070.00016.93
8.0.210.0060.00316.82
8.0.200.0000.01116.92
8.0.190.0040.00416.96
8.0.180.0000.00716.93
8.0.170.0000.00916.82
8.0.160.0000.00816.88
8.0.150.0080.00016.72
8.0.140.0100.00016.77
8.0.130.0150.00416.92
8.0.120.0140.00516.75
8.0.110.0120.00616.81
8.0.100.0170.00316.86
8.0.90.0090.00916.89
8.0.80.0080.01116.80
8.0.70.0130.00616.67
8.0.60.0140.00416.69
8.0.50.0110.00716.88
8.0.30.0090.00916.93
8.0.20.0160.00316.91
8.0.10.0090.00916.83
8.0.00.0090.00417.00
7.4.330.0050.00015.55
7.4.320.0000.00616.52
7.4.300.0000.00616.64
7.4.290.0080.00016.47
7.4.280.0040.00416.50
7.4.270.0030.00716.39
7.4.260.0170.00316.54
7.4.250.0180.00416.38
7.4.240.0130.01016.39
7.4.230.0150.00916.50
7.4.220.0120.00716.41
7.4.210.0180.00316.47
7.4.200.0170.00216.41
7.4.190.0170.00316.66
7.4.180.0130.00616.52
7.4.160.0140.00616.62
7.4.150.0130.00516.48
7.4.140.0120.00316.43
7.4.130.0120.00416.40
7.4.120.0080.00416.42
7.4.110.0080.00316.21
7.4.100.0110.00616.48
7.4.90.0110.00416.32
7.4.80.0130.00316.31
7.4.70.0070.00416.26
7.4.60.0090.00316.49
7.4.50.0050.00516.34
7.4.40.0080.00316.35
7.4.30.0000.00816.48
7.4.20.0060.00716.49
7.4.10.0090.00316.40
7.4.00.0060.00716.36
7.3.330.0080.00516.25
7.3.320.0090.00516.14
7.3.310.0100.00716.07
7.3.300.0000.01116.18
7.3.290.0040.00816.36
7.3.280.0170.00016.21
7.3.270.0170.00316.17
7.3.260.0140.00616.38
7.3.250.0130.00616.40
7.3.240.0140.00616.28
7.3.230.0150.00416.22
7.3.220.0170.00316.06
7.3.210.0200.00016.42
7.3.200.0190.00016.27
7.3.190.0150.00616.20
7.3.180.0150.00316.18
7.3.170.0130.00416.30
7.3.160.0120.00016.12
7.3.150.0190.00016.03
7.3.140.0160.00316.13
7.3.130.0190.00016.19

preferences:
56.73 ms | 1524 KiB | 5 Q