3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array( 'id' => 1, 'user_name'=>'test1' ), array( 'id' => 2, 'user_name'=>'test2' ), array( 'id' => 3, 'user_name'=>'test3' ) ); $arr2 = array( array( 'id' => 1, 'shop_name'=>'shop1' ), array( 'id' => 5, 'shop_name'=>'shop2' ), array( 'id' => 3, 'shop_name'=>'shop3' ) );$tmp = ''; foreach ($arr2 as $k) { $tmp[$k['id']] = $k; } foreach ($arr as &$v) { $sn = $tmp[$v['id']]['shop_name']; $sn = $sn ? $sn :''; $v['shop_name'] = $sn; }print_r($tmp); print_r($arr);

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.3.40.0150.00018.71
8.3.30.0070.00718.81
8.3.20.0080.00018.95
8.3.10.0080.00021.22
8.3.00.0040.00423.53
8.2.170.0150.00022.96
8.2.160.0030.01020.44
8.2.150.0040.01124.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0020.00521.11
8.2.110.0060.00322.14
8.2.100.0090.00317.91
8.2.90.0040.00419.20
8.2.80.0050.00317.97
8.2.70.0030.00617.75
8.2.60.0000.00817.93
8.2.50.0080.00018.07
8.2.40.0060.00318.34
8.2.30.0080.00019.91
8.2.20.0040.00417.82
8.2.10.0040.00417.79
8.2.00.0040.00417.71
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0070.00422.55
8.1.230.0110.00020.89
8.1.220.0040.00418.77
8.1.210.0060.00318.99
8.1.200.0030.00617.47
8.1.190.0000.00817.53
8.1.180.0000.00818.10
8.1.170.0080.00018.48
8.1.160.0000.00718.88
8.1.150.0000.00718.63
8.1.140.0040.00417.50
8.1.130.0070.00017.74
8.1.120.0000.00817.43
8.1.110.0000.00917.41
8.1.100.0030.00317.34
8.1.90.0000.00917.39
8.1.80.0070.00017.39
8.1.70.0080.00017.44
8.1.60.0000.00717.59
8.1.50.0060.00317.46
8.1.40.0070.00017.46
8.1.30.0000.00817.64
8.1.20.0080.00017.59
8.1.10.0040.00417.49
8.1.00.0000.01017.48
8.0.300.0040.00420.04
8.0.290.0000.00817.18
8.0.280.0000.00718.32
8.0.270.0030.00317.34
8.0.260.0070.00016.81
8.0.250.0050.00216.91
8.0.240.0040.00416.98
8.0.230.0040.00417.07
8.0.220.0000.00716.95
8.0.210.0030.00616.86
8.0.200.0040.00416.97
8.0.190.0030.00517.01
8.0.180.0000.00716.99
8.0.170.0050.00316.95
8.0.160.0000.00716.82
8.0.150.0030.00516.95
8.0.140.0080.00016.83
8.0.130.0060.00013.35
8.0.120.0030.00516.89
8.0.110.0090.00016.75
8.0.100.0080.00017.06
8.0.90.0050.00316.99
8.0.80.0060.00916.99
8.0.70.0050.00216.76
8.0.60.0040.00416.86
8.0.50.0050.00316.94
8.0.30.0050.01317.01
8.0.20.0170.00317.40
8.0.10.0070.00016.85
8.0.00.0090.01316.73
7.4.330.0060.00014.88
7.4.320.0040.00416.61
7.4.300.0040.00416.38
7.4.290.0000.00716.54
7.4.280.0040.00716.57
7.4.270.0060.00016.41
7.4.260.0030.00313.23
7.4.250.0040.00416.40
7.4.240.0030.00316.61
7.4.230.0000.00716.57
7.4.220.0160.00616.53
7.4.210.0060.01116.57
7.4.200.0000.00716.57
7.4.190.0030.00416.53
7.4.160.0060.00916.58
7.4.150.0120.00617.40
7.4.140.0120.00517.86
7.4.130.0130.00816.51
7.4.120.0110.00616.38
7.4.110.0120.00616.50
7.4.100.0100.00716.55
7.4.90.0190.00316.48
7.4.80.0080.00819.37
7.4.70.0090.00816.55
7.4.60.0030.01516.32
7.4.50.0000.00916.18
7.4.40.0070.01022.27
7.4.30.0100.00716.63
7.4.00.0110.00315.09
7.3.330.0000.00513.31
7.3.320.0030.00313.30
7.3.310.0040.00416.31
7.3.300.0000.00716.46
7.3.290.0060.01016.29
7.3.280.0050.01016.37
7.3.270.0030.01317.40
7.3.260.0110.00618.24
7.3.250.0110.01416.43
7.3.240.0100.00716.40
7.3.230.0040.01216.47
7.3.210.0030.01816.45
7.3.200.0200.00319.39
7.3.190.0030.01516.67
7.3.180.0080.00816.32
7.3.170.0080.00816.39
7.3.160.0090.00616.53
7.3.120.0070.00814.99
7.3.110.0030.01314.78
7.3.100.0080.01114.96
7.3.90.0080.00514.84
7.3.80.0070.00714.88
7.3.70.0040.00614.65
7.3.60.0060.00714.88
7.3.50.0050.00814.88
7.3.40.0040.00614.82
7.3.30.0070.00714.71
7.3.20.0080.00616.79
7.3.10.0080.00616.63
7.3.00.0050.00816.86
7.2.330.0030.01416.59
7.2.320.0070.01016.82
7.2.310.0150.00316.64
7.2.300.0030.01316.69
7.2.290.0100.00616.44
7.2.250.0070.01015.29
7.2.240.0080.00815.11
7.2.230.0110.00315.29
7.2.220.0110.00315.29
7.2.210.0040.00915.11
7.2.200.0050.00815.09
7.2.190.0020.01215.12
7.2.180.0050.01115.15
7.2.170.0050.00815.13
7.2.160.0080.00615.13
7.2.150.0070.00816.86
7.2.140.0080.00517.04
7.2.130.0080.00716.97
7.2.120.0100.00517.01
7.2.110.0080.00616.97
7.2.100.0040.01216.94
7.2.90.0020.01217.05
7.2.80.0060.00716.83
7.2.70.0080.00516.99
7.2.60.0080.00616.80
7.2.50.0070.00416.91
7.2.40.0070.00616.91
7.2.30.0030.00616.92
7.2.20.0040.01217.07
7.2.10.0100.00216.90
7.2.00.0040.00917.81
7.1.330.0050.00915.88
7.1.320.0020.01315.82
7.1.310.0080.00515.82
7.1.300.0040.01115.89
7.1.290.0070.00415.74
7.1.280.0040.01115.74
7.1.270.0070.00815.72
7.1.260.0070.00915.72
7.1.250.0040.00815.80
7.1.240.0060.00916.07
7.1.230.0100.00315.88
7.1.220.0090.00315.85
7.1.210.0030.00715.79
7.1.200.0090.01015.75
7.1.190.0030.00715.91
7.1.180.0070.00715.79
7.1.170.0070.00715.77
7.1.160.0080.00515.74
7.1.150.0030.01015.86
7.1.140.0070.01415.97
7.1.130.0040.01115.93
7.1.120.0120.00315.79
7.1.110.0040.00815.71
7.1.100.0050.01116.89
7.1.90.0040.00715.95
7.1.80.0030.01015.62
7.1.70.0040.00816.43
7.1.60.0050.01117.60
7.1.50.0100.00616.35
7.1.40.0060.00315.58
7.1.30.0000.01415.76
7.1.20.0060.00615.89
7.1.10.0040.01115.50
7.1.00.0070.03219.19
7.0.330.0030.00615.14
7.0.320.0040.00415.47
7.0.310.0100.00315.07
7.0.300.0070.00715.37
7.0.290.0070.00715.39
7.0.280.0130.00715.49
7.0.270.0000.01415.54
7.0.260.0060.00915.05
7.0.250.0000.01715.32
7.0.240.0070.00715.54
7.0.230.0000.01115.63
7.0.220.0030.00715.54
7.0.210.0070.00715.56
7.0.200.0070.00316.04
7.0.190.0030.01215.64
7.0.180.0060.01215.52
7.0.170.0040.01615.30
7.0.160.0040.01215.55
7.0.150.0070.00715.48
7.0.140.0050.03918.82
7.0.130.0100.00015.41
7.0.120.0110.00715.29
7.0.110.0040.00815.40
7.0.100.0090.00915.46
7.0.90.0110.00315.30
7.0.80.0090.00315.20
7.0.70.0030.01015.51
7.0.60.0120.04218.52
7.0.50.0140.04418.88
7.0.40.0130.04316.74
7.0.30.0130.03416.80
7.0.20.0130.04516.62
7.0.10.0090.04216.67
7.0.00.0120.03416.75
5.6.400.0030.01013.91
5.6.390.0030.01214.36
5.6.380.0030.00914.57
5.6.370.0060.00914.28
5.6.360.0070.00614.30
5.6.350.0110.00714.40
5.6.340.0030.01314.67
5.6.330.0060.00914.57
5.6.320.0070.01314.52
5.6.310.0030.00914.21
5.6.300.0090.00614.61
5.6.290.0030.01314.79
5.6.280.0030.04517.80
5.6.270.0090.00914.09
5.6.260.0070.00714.35
5.6.250.0030.01014.29
5.6.240.0030.01014.46
5.6.230.0100.00314.14
5.6.220.0060.00914.59
5.6.210.0070.02417.57
5.6.200.0130.04517.83
5.6.190.0080.04817.71
5.6.180.0150.04417.60
5.6.170.0080.03917.86
5.6.160.0170.04317.65
5.6.150.0080.04017.67
5.6.140.0100.03817.80
5.6.130.0080.05017.79
5.6.120.0100.03917.66
5.6.110.0120.04517.70
5.6.100.0100.04617.71
5.6.90.0120.03917.82
5.6.80.0090.02517.33
5.6.70.0130.04317.33
5.6.60.0080.03517.38
5.6.50.0150.04517.27
5.6.40.0170.03817.47
5.6.30.0140.03917.23
5.6.20.0100.04217.37
5.6.10.0100.02717.40
5.6.00.0130.04617.32
5.5.380.0070.00714.30
5.5.370.0080.00414.13
5.5.360.0030.01014.20
5.5.350.0070.04717.46
5.5.340.0140.04617.42
5.5.330.0090.04717.57
5.5.320.0120.04217.57
5.5.310.0200.03817.69
5.5.300.0130.03317.60
5.5.290.0140.03817.56
5.5.280.0080.02817.55
5.5.270.0160.04117.74
5.5.260.0140.04017.43
5.5.250.0130.04517.41
5.5.240.0080.02817.27
5.5.230.0080.03417.27
5.5.220.0100.03617.26
5.5.210.0160.04017.04
5.5.200.0140.03617.32
5.5.190.0080.04617.37
5.5.180.0100.03316.98
5.5.170.0060.00614.46
5.5.160.0150.03817.23
5.5.150.0050.03417.24
5.5.140.0160.03817.23
5.5.130.0060.03017.18
5.5.120.0110.04117.11
5.5.110.0170.03817.04
5.5.100.0130.03917.02
5.5.90.0100.03817.22
5.5.80.0190.03417.14
5.5.70.0130.04016.99
5.5.60.0090.03717.12
5.5.50.0120.03617.06
5.5.40.0100.04216.99
5.5.30.0100.04717.16
5.5.20.0070.03717.08
5.5.10.0150.03617.10
5.5.00.0100.04317.08
5.4.450.0120.03715.72
5.4.440.0050.02815.67
5.4.430.0100.03715.76
5.4.420.0170.04215.66
5.4.410.0090.04415.67
5.4.400.0120.03715.65
5.4.390.0100.02815.63
5.4.380.0140.03515.65
5.4.370.0080.03815.58
5.4.360.0080.03815.58
5.4.350.0090.04215.65
5.4.340.0070.03615.59
5.4.330.0040.00812.10
5.4.320.0120.03515.58
5.4.310.0080.04415.58
5.4.300.0120.02715.50
5.4.290.0180.02715.56
5.4.280.0120.03715.57
5.4.270.0140.02215.64
5.4.260.0150.03515.58
5.4.250.0070.04415.59
5.4.240.0120.03815.55
5.4.230.0110.04115.58
5.4.220.0100.03415.64
5.4.210.0140.03515.54
5.4.200.0120.04115.55
5.4.190.0110.04315.50
5.4.180.0100.04115.63
5.4.170.0130.04115.51
5.4.160.0080.04315.63
5.4.150.0120.04015.54
5.4.140.0130.03114.17
5.4.130.0080.03814.27
5.4.120.0130.03314.27
5.4.110.0100.03714.28
5.4.100.0130.02314.17
5.4.90.0080.02614.21
5.4.80.0080.03914.24
5.4.70.0080.02014.25
5.4.60.0060.02214.20
5.4.50.0110.02714.29
5.4.40.0100.03714.30
5.4.30.0100.02414.24
5.4.20.0070.03814.24
5.4.10.0130.03314.19
5.4.00.0120.03413.94
5.3.290.0100.03813.38
5.3.280.0080.04213.36
5.3.270.0100.03213.28
5.3.260.0150.02713.39
5.3.250.0120.02513.33
5.3.240.0100.03513.38
5.3.230.0100.03413.38
5.3.220.0130.03513.34
5.3.210.0110.03413.36
5.3.200.0070.04313.35
5.3.190.0110.03713.35
5.3.180.0120.02313.35
5.3.170.0110.02613.35
5.3.160.0110.02813.33
5.3.150.0130.03513.36
5.3.140.0100.03913.36
5.3.130.0110.03713.30
5.3.120.0130.03813.35
5.3.110.0110.04013.30
5.3.100.0100.03413.10
5.3.90.0120.03813.05
5.3.80.0110.04013.06
5.3.70.0110.03813.08
5.3.60.0140.03612.98
5.3.50.0150.02813.05
5.3.40.0190.02813.02
5.3.30.0100.02912.98
5.3.20.0100.03412.84
5.3.10.0130.03112.92
5.3.00.0130.03712.88
5.2.170.0130.05311.16
5.2.160.0230.05011.14
5.2.150.0100.03711.18
5.2.140.0270.05311.24
5.2.130.0170.05711.10
5.2.120.0100.05711.21
5.2.110.0200.06011.09
5.2.100.0130.05311.15
5.2.90.0130.06011.16
5.2.80.0130.06011.08
5.2.70.0200.05710.98
5.2.60.0130.06310.95
5.2.50.0070.06310.86
5.2.40.0130.04711.10
5.2.30.0100.06010.96
5.2.20.0170.05310.86
5.2.10.0070.03310.96
5.2.00.0100.02710.71
5.1.60.0170.01710.00
5.1.50.0070.02710.04
5.1.40.0070.03010.07
5.1.30.0100.02710.29
5.1.20.0030.03310.27
5.1.10.0100.0309.89
5.1.00.0130.02010.11
5.0.50.0030.0178.67
5.0.40.0070.0178.60
5.0.30.0070.0238.60
5.0.20.0070.0208.60
5.0.10.0000.0178.60
5.0.00.0000.0378.60
4.4.90.0000.0308.60
4.4.80.0000.0408.60
4.4.70.0100.0338.60
4.4.60.0070.0278.60
4.4.50.0070.0208.60
4.4.40.0070.0238.60
4.4.30.0030.0178.60
4.4.20.0100.0108.60
4.4.10.0030.0178.60
4.4.00.0030.0278.60
4.3.110.0070.0108.60
4.3.100.0030.0138.60
4.3.90.0070.0178.60
4.3.80.0000.0208.60
4.3.70.0000.0108.60
4.3.60.0000.0108.60
4.3.50.0030.0108.60
4.3.40.0000.0208.60
4.3.30.0000.0208.60
4.3.20.0000.0178.60
4.3.10.0000.0178.60
4.3.00.0030.0108.60

preferences:
39.84 ms | 400 KiB | 5 Q