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($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.60.0140.00716.63
8.3.50.0130.00521.95
8.3.40.0090.00618.84
8.3.30.0060.01219.26
8.3.20.0040.00420.29
8.3.10.0040.00423.66
8.3.00.0030.00320.69
8.2.180.0040.01116.88
8.2.170.0090.00622.96
8.2.160.0100.00322.13
8.2.150.0040.00424.18
8.2.140.0140.00324.66
8.2.130.0050.00326.16
8.2.120.0040.00422.21
8.2.110.0040.01222.24
8.2.100.0080.00417.72
8.2.90.0070.00019.17
8.2.80.0040.00418.05
8.2.70.0030.00517.75
8.2.60.0080.00017.93
8.2.50.0060.00618.07
8.2.40.0030.00518.34
8.2.30.0000.00818.04
8.2.20.0030.00517.78
8.2.10.0030.00519.60
8.2.00.0040.00417.66
8.1.280.0150.00625.92
8.1.270.0040.00423.84
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0000.00923.91
8.1.230.0070.00419.07
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0090.00017.40
8.1.180.0040.00418.10
8.1.170.0050.00318.65
8.1.160.0040.00422.05
8.1.150.0040.00418.56
8.1.140.0000.00717.49
8.1.130.0080.00017.88
8.1.120.0000.00717.53
8.1.110.0000.00717.41
8.1.100.0100.00017.47
8.1.90.0070.00017.36
8.1.80.0030.00317.50
8.1.70.0000.00717.33
8.1.60.0030.00617.58
8.1.50.0030.00617.41
8.1.40.0000.00817.45
8.1.30.0080.00017.60
8.1.20.0000.00817.54
8.1.10.0060.00617.59
8.1.00.0000.00817.39
8.0.300.0000.00718.77
8.0.290.0070.00017.18
8.0.280.0050.00218.31
8.0.270.0060.00317.13
8.0.260.0000.00816.98
8.0.250.0030.00316.97
8.0.240.0040.00416.99
8.0.230.0000.00717.03
8.0.220.0030.00316.94
8.0.210.0040.00416.93
8.0.200.0000.00717.00
8.0.190.0040.00416.91
8.0.180.0000.00717.04
8.0.170.0000.00817.00
8.0.160.0020.00517.01
8.0.150.0030.00616.86
8.0.140.0000.00716.95
8.0.130.0050.00013.31
8.0.120.0030.00516.93
8.0.110.0000.00716.97
8.0.100.0000.00816.77
8.0.90.0060.00316.95
8.0.80.0100.01016.90
8.0.70.0040.00416.91
8.0.60.0040.00416.92
8.0.50.0030.00516.88
8.0.30.0080.01117.12
8.0.20.0100.01017.40
8.0.10.0070.00017.02
8.0.00.0030.01416.98
7.4.330.0000.00515.02
7.4.320.0030.00316.60
7.4.300.0030.00316.41
7.4.290.0070.00016.59
7.4.280.0000.01016.65
7.4.270.0030.00316.56
7.4.260.0040.00416.48
7.4.250.0040.00416.50
7.4.240.0050.00216.45
7.4.230.0030.00316.57
7.4.220.0090.01216.45
7.4.210.0050.01116.60
7.4.200.0070.00016.57
7.4.190.0050.00316.41
7.4.160.0120.00616.59
7.4.150.0130.00317.40
7.4.140.0100.00817.86
7.4.130.0100.00616.44
7.4.120.0080.00916.57
7.4.110.0170.00016.46
7.4.100.0130.01216.54
7.4.90.0210.01316.40
7.4.80.0200.00316.72
7.4.70.0120.01216.32
7.4.60.0090.00916.54
7.4.50.0060.00316.47
7.4.40.0030.00922.77
7.4.30.0060.01216.65
7.4.10.0120.00315.16
7.4.00.0070.01014.91
7.3.330.0030.00313.22
7.3.320.0000.00513.22
7.3.310.0080.00016.25
7.3.300.0030.00316.40
7.3.290.0070.00716.34
7.3.280.0100.00716.30
7.3.270.0100.00617.40
7.3.260.0130.01016.43
7.3.250.0130.00816.46
7.3.240.0160.00616.59
7.3.230.0100.00616.57
7.3.210.0070.01116.42
7.3.200.0130.00619.39
7.3.190.0100.00716.38
7.3.180.0120.00916.37
7.3.170.0080.01216.31
7.3.160.0070.01016.54
7.3.130.0030.01315.07
7.3.120.0070.00914.78
7.3.110.0060.01114.79
7.3.100.0060.00714.81
7.3.90.0120.00214.91
7.3.80.0080.00814.91
7.3.70.0050.00714.58
7.3.60.0080.00714.63
7.3.50.0050.00914.76
7.3.40.0070.00714.77
7.3.30.0120.00214.87
7.3.20.0080.00616.77
7.3.10.0030.01116.65
7.3.00.0060.00716.48
7.2.330.0040.01216.61
7.2.320.0100.01316.52
7.2.310.0060.01116.63
7.2.300.0060.01016.80
7.2.290.0120.00616.72
7.2.260.0070.00714.82
7.2.250.0050.01115.16
7.2.240.0080.00914.94
7.2.230.0090.00815.24
7.2.220.0030.01415.10
7.2.210.0060.00915.01
7.2.200.0060.00715.20
7.2.190.0050.01115.10
7.2.180.0030.00815.02
7.2.170.0040.01214.93
7.2.160.0080.00515.22
7.2.150.0060.00917.02
7.2.140.0090.00316.95
7.2.130.0060.01016.85
7.2.120.0030.01116.91
7.2.110.0040.01016.94
7.2.100.0060.00516.92
7.2.90.0070.00616.85
7.2.80.0070.00616.74
7.2.70.0070.00816.89
7.2.60.0120.00616.87
7.2.50.0100.00316.90
7.2.40.0050.00916.98
7.2.30.0040.01116.86
7.2.20.0070.00716.88
7.2.10.0100.00316.93
7.2.00.0020.01017.58
7.1.330.0050.01015.76
7.1.320.0110.00615.76
7.1.310.0080.00815.83
7.1.300.0080.00615.91
7.1.290.0020.01015.85
7.1.280.0060.00615.83
7.1.270.0030.00916.01
7.1.260.0070.00515.71
7.1.250.0070.00615.75
7.1.240.0060.00815.75
7.1.230.0050.00615.74
7.1.220.0050.00815.69
7.1.210.0050.00615.77
7.1.200.0030.00815.60
7.1.190.0040.00815.93
7.1.180.0050.00715.79
7.1.170.0040.00715.51
7.1.160.0060.00515.73
7.1.150.0020.01115.64
7.1.140.0070.00615.85
7.1.130.0060.00715.67
7.1.120.0090.00515.75
7.1.110.0090.00515.82
7.1.100.0070.00616.45
7.1.90.0050.00615.58
7.1.80.0040.01015.77
7.1.70.0040.00815.99
7.1.60.0030.01316.66
7.1.50.0060.00815.96
7.1.40.0020.01015.77
7.1.30.0050.01115.74
7.1.20.0030.00915.81
7.1.10.0080.00515.66
7.1.00.0070.02217.37
7.0.330.0050.00715.42
7.0.320.0060.00815.24
7.0.310.0090.00315.29
7.0.300.0030.00615.30
7.0.290.0080.00515.43
7.0.280.0060.00415.29
7.0.270.0040.00715.24
7.0.260.0090.00515.25
7.0.250.0090.00715.41
7.0.240.0070.00615.34
7.0.230.0060.00815.31
7.0.220.0060.00615.38
7.0.210.0040.00915.47
7.0.200.0060.00815.64
7.0.190.0030.01015.41
7.0.180.0070.00715.41
7.0.170.0080.00615.33
7.0.160.0040.01015.43
7.0.150.0060.00815.25
7.0.140.0030.02316.93
7.0.130.0030.01015.49
7.0.120.0040.00915.17
7.0.110.0030.01215.25
7.0.100.0190.02316.45
7.0.90.0150.02116.55
7.0.80.0190.02316.50
7.0.70.0140.01516.46
7.0.60.0160.01716.44
7.0.50.0140.02316.67
7.0.40.0090.01615.17
7.0.30.0060.02315.12
7.0.20.0070.01515.05
7.0.10.0020.01915.17
7.0.00.0040.02515.03
5.6.400.0020.01014.61
5.6.390.0030.01014.35
5.6.380.0090.00514.33
5.6.370.0080.00514.61
5.6.360.0100.00414.36
5.6.350.0040.01014.29
5.6.340.0070.00814.50
5.6.330.0070.00514.58
5.6.320.0070.00614.50
5.6.310.0040.00714.27
5.6.300.0090.00614.55
5.6.290.0110.00514.32
5.6.280.0050.02716.00
5.6.270.0030.00914.61
5.6.260.0060.00514.57
5.6.250.0050.02515.97
5.6.240.0070.02415.98
5.6.230.0050.01815.93
5.6.220.0090.02416.01
5.6.210.0030.02315.86
5.6.200.0090.01316.01
5.6.190.0080.02315.99
5.6.180.0070.02015.93
5.6.170.0040.02216.00
5.6.160.0070.01716.01
5.6.150.0080.02316.00
5.6.140.0020.02916.03
5.6.130.0070.02615.88
5.6.120.0060.02615.91
5.6.110.0050.01916.02
5.6.100.0070.01315.92
5.6.90.0030.02915.94
5.6.80.0060.01415.76
5.6.70.0070.02215.77
5.6.60.0040.01615.89
5.6.50.0080.02015.80
5.6.40.0060.02415.87
5.6.30.0060.02515.76
5.6.20.0040.02615.76
5.6.10.0050.02515.84
5.6.00.0040.02615.83
5.5.380.0030.01814.95
5.5.370.0100.02115.04
5.5.360.0050.02414.98
5.5.350.0050.02215.05
5.5.340.0030.02615.17
5.5.330.0040.03215.20
5.5.320.0080.02415.09
5.5.310.0050.02315.07
5.5.300.0030.01714.97
5.5.290.0030.02615.16
5.5.280.0070.02215.17
5.5.270.0070.01415.01
5.5.260.0070.01415.13
5.5.250.0060.02515.04
5.5.240.0030.01615.00
5.5.230.0050.02214.86
5.5.220.0060.02114.97
5.5.210.0060.02414.91
5.5.200.0070.02215.01
5.5.190.0040.02014.97
5.5.180.0070.01414.80
5.5.170.0070.00513.13
5.5.160.0070.01314.94
5.5.150.0050.02314.91
5.5.140.0060.02014.79
5.5.130.0030.02914.88
5.5.120.0050.02214.96
5.5.110.0070.02615.08
5.5.100.0020.02714.98
5.5.90.0050.02014.91
5.5.80.0060.02414.90
5.5.70.0050.01714.89
5.5.60.0060.02714.87
5.5.50.0080.01814.87
5.5.40.0040.01414.83
5.5.30.0010.02614.92
5.5.20.0070.01914.95
5.5.10.0020.02415.02
5.5.00.0040.01814.77
5.4.450.0040.01513.31
5.4.440.0020.02113.34
5.4.430.0070.02313.40
5.4.420.0030.02513.34
5.4.410.0040.02713.29
5.4.400.0030.01313.35
5.4.390.0060.01213.32
5.4.380.0050.01913.30
5.4.370.0040.01313.26
5.4.360.0060.02713.34
5.4.350.0040.01813.36
5.4.340.0070.01513.28
5.4.330.0040.00311.35
5.4.320.0070.01513.29
5.4.310.0030.01413.37
5.4.300.0040.01413.32
5.4.290.0050.01713.25
5.4.280.0040.01813.25
5.4.270.0060.02113.35
5.4.260.0050.01513.24
5.4.250.0030.02113.30
5.4.240.0050.02313.21
5.4.230.0050.02213.27
5.4.220.0050.01913.33
5.4.210.0070.02013.18
5.4.200.0060.01813.29
5.4.190.0060.02113.20
5.4.180.0070.02113.32
5.4.170.0030.01613.23
5.4.160.0040.02113.27
5.4.150.0040.01513.16
5.4.140.0080.01712.64
5.4.130.0020.02612.72
5.4.120.0060.02012.64
5.4.110.0010.02012.61
5.4.100.0030.01512.63
5.4.90.0060.01612.56
5.4.80.0030.02412.46
5.4.70.0040.01312.55
5.4.60.0050.01512.58
5.4.50.0020.01412.64
5.4.40.0030.01512.56
5.4.30.0070.01012.67
5.4.20.0040.01912.63
5.4.10.0020.01512.49
5.4.00.0070.02012.41
5.3.290.0060.01512.04
5.3.280.0080.01911.96
5.3.270.0050.02112.00
5.3.260.0040.01712.01
5.3.250.0060.02112.02
5.3.240.0050.01611.94
5.3.230.0020.01512.03
5.3.220.0040.01811.99
5.3.210.0050.01511.96
5.3.200.0040.01312.00
5.3.190.0060.01911.99
5.3.180.0050.02112.05
5.3.170.0060.01211.99
5.3.160.0040.02412.07
5.3.150.0050.01812.05
5.3.140.0060.01312.02
5.3.130.0040.01912.04
5.3.120.0070.02111.94
5.3.110.0040.02312.04
5.3.100.0050.02111.89
5.3.90.0060.01911.91
5.3.80.0070.02111.88
5.3.70.0070.02011.79
5.3.60.0070.01011.84
5.3.50.0060.01511.89
5.3.40.0050.02211.85
5.3.30.0030.01511.80
5.3.20.0050.01811.73
5.3.10.0050.02011.71
5.3.00.0060.02111.70
5.2.170.0030.03511.03
5.2.160.0040.03411.08
5.2.150.0000.02411.07
5.2.140.0020.01711.02
5.2.130.0020.01810.96
5.2.120.0050.03011.00
5.2.110.0020.03310.96
5.2.100.0050.03310.96
5.2.90.0030.02711.07
5.2.80.0050.01511.05
5.2.70.0070.02710.96
5.2.60.0060.02810.96
5.2.50.0020.03510.96
5.2.40.0020.03010.96
5.2.30.0060.01311.00
5.2.20.0060.02910.99
5.2.10.0050.02910.96
5.2.00.0050.01410.96
5.1.60.0050.02710.96
5.1.50.0040.01510.96
5.1.40.0030.01610.96
5.1.30.0030.01510.96
5.1.20.0040.02010.96
5.1.10.0030.02510.96
5.1.00.0050.02410.96
5.0.50.0020.01910.96
5.0.40.0060.00810.96
5.0.30.0080.03010.96
5.0.20.0020.02310.96
5.0.10.0030.01010.96
5.0.00.0080.02910.96
4.4.90.0040.00710.96
4.4.80.0000.01310.96
4.4.70.0020.00810.96
4.4.60.0030.01010.96
4.4.50.0000.01010.96
4.4.40.0010.02810.96
4.4.30.0010.01410.96
4.4.20.0050.01610.96
4.4.10.0040.01310.96
4.4.00.0010.01610.96
4.3.110.0020.01410.96
4.3.100.0040.01410.96
4.3.90.0000.02110.96
4.3.80.0040.02310.96
4.3.70.0030.01310.96
4.3.60.0020.01810.96
4.3.50.0050.01010.96
4.3.40.0030.01010.96
4.3.30.0020.02210.96
4.3.20.0020.01410.96
4.3.10.0020.01310.96
4.3.00.0050.01510.96

preferences:
35.07 ms | 401 KiB | 5 Q