3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = ["Key1" => "1", "Key2" => "22, 4, 123"]; $array2 = [ ["ID" => "1", "Name" => "Name1"], ["ID" => "22", "Name" => "Name22"], ["ID" => "123", "Name" => "Name123"] ]; $lookup = array_column($array2, 'Name', 'ID'); var_export( preg_replace_callback( '/\d+/', fn($m) => $lookup[$m[0]] ?? $m[0], $array1 ) );

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.00917.81
8.4.130.0100.01218.00
8.4.120.0130.00720.64
8.4.110.0110.00918.86
8.4.100.0080.01318.57
8.4.90.0120.00820.60
8.4.80.0110.00918.98
8.4.70.0100.01018.99
8.4.60.0140.00618.82
8.4.50.0120.00818.86
8.4.40.0060.00320.61
8.4.30.0130.00318.95
8.4.20.0130.00717.99
8.4.10.0060.00323.63
8.3.260.0120.00916.50
8.3.250.0120.00718.95
8.3.240.0110.00816.54
8.3.230.0140.00516.68
8.3.220.0060.00219.05
8.3.210.0070.00816.77
8.3.200.0030.00616.53
8.3.190.0080.00217.05
8.3.180.0070.00318.74
8.3.170.0060.01316.65
8.3.160.0110.00717.22
8.3.150.0140.00418.82
8.3.140.0130.00618.94
8.3.130.0040.00418.57
8.3.120.0060.00918.93
8.3.110.0050.00320.94
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0060.00317.97
8.3.70.0090.00916.63
8.3.60.0120.00916.75
8.3.50.0110.00918.73
8.3.40.0100.00322.00
8.3.30.0180.00618.96
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0100.00916.84
8.2.280.0140.00618.61
8.2.270.0150.00316.57
8.2.260.0000.00816.96
8.2.250.0100.01018.57
8.2.240.0070.01119.02
8.2.230.0000.00922.58
8.2.220.0160.00337.54
8.2.210.0110.00426.77
8.2.200.0060.00316.88
8.2.190.0110.00416.63
8.2.180.0140.00316.88
8.2.170.0150.00019.04
8.2.160.0070.00722.96
8.2.150.0030.00525.66
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0080.00021.00
8.2.110.0090.00620.57
8.2.100.0110.00017.84
8.2.90.0090.00317.88
8.2.80.0040.00419.05
8.2.70.0030.00617.75
8.2.60.0030.00617.88
8.2.50.0000.00918.05
8.2.40.0100.00718.05
8.2.30.0140.00518.05
8.2.20.0150.00318.05
8.2.10.0110.00818.05
8.2.00.0110.00018.05
8.1.330.0070.00516.36
8.1.320.0110.00716.54
8.1.310.0080.00016.91
8.1.300.0090.00020.03
8.1.290.0060.00330.84
8.1.280.0110.00425.92
8.1.270.0050.00324.66
8.1.260.0000.00826.35
8.1.250.0090.00028.09
8.1.240.0060.00322.07
8.1.230.0080.00317.82
8.1.220.0000.00917.77
8.1.210.0030.00518.77
8.1.200.0060.00617.61
8.1.190.0040.00417.48
8.1.180.0130.00318.05
8.1.170.0140.00418.05
8.1.160.0150.00418.05
8.1.150.0120.00618.05
8.1.140.0120.00618.05
8.1.130.0200.00018.05
8.1.120.0150.00518.05
8.1.110.0140.00318.05
8.1.100.0100.00718.05
8.1.90.0140.00318.05
8.1.80.0130.00418.05
8.1.70.0140.00618.05
8.1.60.0150.00318.05
8.1.50.0100.01018.05
8.1.40.0110.00818.05
8.1.30.0140.00718.05
8.1.20.0170.00318.05
8.1.10.0170.00418.05
8.1.00.0170.00318.05
8.0.300.0040.00420.10
8.0.290.0070.00016.88
8.0.280.0150.00518.05
8.0.270.0150.00518.05
8.0.260.0170.00018.05
8.0.250.0150.00218.05
8.0.240.0170.00018.05
8.0.230.0100.00718.05
8.0.220.0090.00918.05
8.0.210.0140.00318.05
8.0.200.0140.00418.05
8.0.190.0110.00818.05
8.0.180.0120.00818.05
8.0.170.0130.00418.05
8.0.160.0040.01318.05
8.0.150.0150.00418.05
8.0.140.0120.00518.05
8.0.130.0090.00818.05
8.0.120.0170.00018.05
8.0.110.0080.01118.05
8.0.100.0180.00018.05
8.0.90.0090.00918.05
8.0.80.0130.00318.05
8.0.70.0080.01018.05
8.0.60.0150.00318.05
8.0.50.0150.00418.05
8.0.30.0190.00018.05
8.0.20.0160.00218.05
8.0.10.0130.00718.05

preferences:
108.59 ms | 403 KiB | 5 Q