3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_one = [ [ 'product_id' => 1, 'product_stock' => '1.2', 'stock_date' => '2022-02-15' ], [ 'product_id' => 2, 'product_stock' => '5', 'stock_date' => '2022-02-15' ], ]; $array_two = [ [ 'product_id' => 1, 'product_slug' => 'product_one', 'product_description' => 'this is the product one' ], [ 'product_id' => 2, 'product_slug' => 'product_two', 'product_description' => 'this is the product two' ], [ 'product_id' => 3, 'product_slug' => 'product_three', 'product_description' => 'this is the product three' ], ]; $lookup = array_column($array_two, null, 'product_id'); var_export( array_map( fn($row) => $row + $lookup[$row['product_id']], $array_one ) );

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.130.0140.00618.81
8.4.120.0120.00724.06
8.4.110.0090.01118.85
8.4.100.0150.00618.07
8.4.90.0050.00320.73
8.4.80.0050.00319.16
8.4.70.0050.00518.75
8.4.60.0080.01218.80
8.4.50.0140.00520.49
8.4.40.0100.00719.59
8.4.30.0160.00320.73
8.4.20.0130.00622.20
8.4.10.0120.00626.04
8.3.250.0090.00918.61
8.3.240.0100.00816.91
8.3.230.0110.01016.71
8.3.220.0060.00218.91
8.3.210.0080.01118.27
8.3.200.0040.00416.59
8.3.190.0120.00617.10
8.3.180.0120.00819.13
8.3.170.0150.00319.11
8.3.160.0100.00720.72
8.3.150.0160.00317.13
8.3.140.0040.00418.96
8.3.130.0030.00618.44
8.3.120.0130.00320.46
8.3.110.0090.00020.94
8.3.100.0070.00016.48
8.3.90.0130.00618.31
8.3.80.0060.00617.97
8.3.70.0120.00616.75
8.3.60.0120.00918.30
8.3.50.0100.00718.25
8.3.40.0070.00720.12
8.3.30.0070.00718.89
8.3.20.0070.00024.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.290.0130.00520.84
8.2.280.0070.00218.51
8.2.270.0120.00620.57
8.2.260.0000.00916.79
8.2.250.0040.01117.03
8.2.240.0090.00019.21
8.2.230.0060.01322.58
8.2.220.0090.00024.06
8.2.210.0100.00026.77
8.2.200.0030.00618.41
8.2.190.0120.00318.16
8.2.180.0150.00016.63
8.2.170.0070.00718.91
8.2.160.0100.00322.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00026.16
8.2.110.0060.00319.36
8.2.100.0090.00317.84
8.2.90.0000.00918.22
8.2.80.0000.01117.97
8.2.70.0000.00818.05
8.2.60.0070.00019.40
8.2.50.0040.00418.10
8.2.40.0080.00020.47
8.2.30.0000.00718.09
8.2.20.0050.00219.38
8.2.10.0140.00417.73
8.2.00.0080.00817.80
8.1.330.0110.00922.28
8.1.320.0120.00816.04
8.1.310.0040.01116.76
8.1.300.0030.00518.00
8.1.290.0100.00018.88
8.1.280.0100.01025.92
8.1.270.0050.00224.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0070.00322.54
8.1.230.0110.00020.90
8.1.220.0030.00617.74
8.1.210.0030.00618.96
8.1.200.0040.00417.35
8.1.190.0000.00720.25
8.1.180.0050.00518.10
8.1.170.0040.00418.64
8.1.160.0030.00520.55
8.1.150.0090.00018.61
8.1.140.0120.00617.45
8.1.130.0140.00417.36
8.1.120.0050.01117.48
8.1.110.0100.00617.46
8.1.100.0180.00017.54
8.1.90.0090.00717.58
8.1.80.0080.00817.55
8.1.70.0130.00317.59
8.1.60.0150.00317.72
8.1.50.0090.00917.50
8.1.40.0120.00617.52
8.1.30.0130.00717.58
8.1.20.0160.00417.72
8.1.10.0150.00417.54
8.1.00.0180.00017.46
8.0.300.0040.00419.86
8.0.290.0080.00016.75
8.0.280.0000.00718.37
8.0.270.0140.00216.87
8.0.260.0100.00516.93
8.0.250.0060.01216.95
8.0.240.0100.00717.01
8.0.230.0150.00016.99
8.0.220.0110.00516.89
8.0.210.0090.00616.79
8.0.200.0160.00016.94
8.0.190.0060.01216.94
8.0.180.0050.01116.93
8.0.170.0150.00317.01
8.0.160.0220.00016.95
8.0.150.0170.00016.74
8.0.140.0090.00916.79
8.0.130.0090.00916.84
8.0.120.0050.01116.94
8.0.110.0170.00016.81
8.0.100.0140.00516.79
8.0.90.0110.00616.88
8.0.80.0150.00216.83
8.0.70.0160.00316.88
8.0.60.0170.00316.92
8.0.50.0050.01416.75
8.0.30.0120.00616.94
8.0.20.0080.01016.98
8.0.10.0080.00816.88

preferences:
32.12 ms | 403 KiB | 5 Q