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; } var_dump($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.4.20.0120.00817.75
8.4.10.0160.00317.55
8.3.150.0030.00616.57
8.3.140.0080.00017.04
8.3.130.0080.00018.66
8.3.120.0060.00320.60
8.3.110.0160.00420.94
8.3.100.0090.00016.84
8.3.90.0090.00326.77
8.3.80.0030.00616.50
8.3.70.0090.00616.75
8.3.60.0140.00318.52
8.3.50.0110.00522.04
8.3.40.0120.00918.61
8.3.30.0060.00918.84
8.3.20.0060.00318.90
8.3.10.0070.01119.29
8.3.00.0040.00423.53
8.2.260.0100.01016.91
8.2.250.0040.00416.98
8.2.240.0040.00418.88
8.2.230.0070.00322.58
8.2.220.0000.00824.06
8.2.210.0030.00526.77
8.2.200.0110.00016.50
8.2.190.0130.00316.88
8.2.180.0100.01316.63
8.2.170.0090.00622.96
8.2.160.0070.01020.53
8.2.150.0030.00624.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00417.75
8.2.110.0090.00021.91
8.2.100.0060.00617.91
8.2.90.0060.00317.82
8.2.80.0050.00319.15
8.2.70.0030.00517.75
8.2.60.0060.00318.16
8.2.50.0090.00018.16
8.2.40.0040.00418.01
8.2.30.0060.00319.86
8.2.20.0020.00517.68
8.2.10.0000.00717.84
8.2.00.0000.00817.80
8.1.310.0110.00716.32
8.1.300.0090.00018.29
8.1.290.0000.01030.84
8.1.280.0070.01325.92
8.1.270.0030.00621.98
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0070.00321.34
8.1.230.0110.00020.92
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0030.00617.48
8.1.190.0040.00417.40
8.1.180.0000.01218.10
8.1.170.0040.00418.71
8.1.160.0040.00418.89
8.1.150.0000.00818.64
8.1.140.0050.00317.51
8.1.130.0000.00717.86
8.1.120.0000.00717.44
8.1.110.0000.00817.50
8.1.100.0000.00817.40
8.1.90.0000.00717.43
8.1.80.0040.00417.46
8.1.70.0000.00717.39
8.1.60.0000.00917.61
8.1.50.0040.00417.44
8.1.40.0040.00417.39
8.1.30.0070.00017.71
8.1.20.0030.00617.64
8.1.10.0050.00317.54
8.1.00.0000.00917.49
8.0.300.0040.00419.94
8.0.290.0040.00416.88
8.0.280.0030.00318.44
8.0.270.0000.00717.17
8.0.260.0000.00716.86
8.0.250.0040.00416.89
8.0.240.0060.00317.04
8.0.230.0070.00017.04
8.0.220.0000.00716.85
8.0.210.0040.00416.96
8.0.200.0030.00316.91
8.0.190.0070.00017.02
8.0.180.0040.00416.93
8.0.170.0040.00416.86
8.0.160.0050.00316.85
8.0.150.0080.00016.88
8.0.140.0050.00316.97
8.0.130.0030.00313.38
8.0.120.0000.00716.80
8.0.110.0040.00416.94
8.0.100.0040.00416.94
8.0.90.0080.00016.84
8.0.80.0060.00916.90
8.0.70.0000.00716.90
8.0.60.0080.00017.01
8.0.50.0040.00416.81
8.0.30.0080.01017.16
8.0.20.0110.00917.40
8.0.10.0040.00417.04
8.0.00.0080.00916.78
7.4.330.0000.00514.65
7.4.320.0070.00016.51
7.4.300.0030.00316.58
7.4.290.0000.00816.59
7.4.280.0030.00316.48
7.4.270.0070.00016.60
7.4.260.0080.00016.40
7.4.250.0040.00416.50
7.4.240.0050.00316.40
7.4.230.0000.00716.33
7.4.220.0170.00716.62
7.4.210.0080.00616.58
7.4.200.0040.00416.62
7.4.190.0070.00016.31
7.4.160.0030.01316.73
7.4.150.0150.01217.40
7.4.140.0070.01317.86
7.4.130.0110.00716.47
7.4.120.0100.00716.53
7.4.110.0110.01116.46
7.4.100.0090.00916.40
7.4.90.0090.00916.38
7.4.80.0100.01319.37
7.4.70.0060.01616.54
7.4.60.0120.00616.40
7.4.50.0030.00516.54
7.4.40.0070.00722.27
7.4.30.0070.01516.29
7.4.10.0060.01316.49
7.4.00.0110.00515.41
7.3.330.0000.00613.32
7.3.320.0000.00613.17
7.3.310.0000.00616.43
7.3.300.0000.00716.38
7.3.290.0040.01216.35
7.3.280.0070.01016.40
7.3.270.0070.01117.40
7.3.260.0150.00618.24
7.3.250.0090.01116.41
7.3.240.0060.01216.53
7.3.230.0100.00716.43
7.3.210.0130.01016.37
7.3.200.0070.01119.39
7.3.190.0140.00316.57
7.3.180.0130.00316.50
7.3.170.0190.00316.61
7.3.160.0060.01016.50
7.3.130.0120.00616.46
7.3.120.0110.00615.29
7.3.110.0070.00915.67
7.3.100.0080.00815.57
7.3.90.0030.01115.56
7.3.80.0030.00815.53
7.3.70.0070.00815.69
7.3.60.0030.00915.62
7.3.50.0020.01415.56
7.3.40.0050.01115.56
7.3.30.0060.00815.62
7.3.20.0080.00617.30
7.3.10.0080.00517.43
7.3.00.0080.00817.52
7.2.330.0110.00716.67
7.2.320.0130.00416.70
7.2.310.0150.00416.75
7.2.300.0070.01816.41
7.2.290.0070.01716.62
7.2.260.0070.01116.75
7.2.250.0080.01215.92
7.2.240.0090.00815.97
7.2.230.0070.00815.95
7.2.220.0030.01215.80
7.2.210.0070.00815.82
7.2.200.0050.01015.83
7.2.190.0080.00215.87
7.2.180.0030.01215.83
7.2.170.0030.01315.93
7.2.160.0100.00716.51
7.2.150.0070.01018.47
7.2.140.0100.00618.46
7.2.130.0060.00618.37
7.2.120.0030.01318.49
7.2.110.0090.00917.43
7.2.100.0060.01218.34
7.2.90.0070.00318.53
7.2.80.0050.00917.63
7.2.70.0030.01018.41
7.2.60.0080.00717.56
7.2.50.0060.00918.37
7.2.40.0100.00718.52
7.2.30.0070.00718.42
7.2.20.0110.00318.33
7.2.10.0000.01018.36
7.2.00.0070.00818.89
7.1.330.0060.00816.64
7.1.320.0050.00716.73
7.1.310.0050.01016.72
7.1.300.0090.00616.54
7.1.290.0080.00516.63
7.1.280.0080.00416.61
7.1.270.0030.00916.59
7.1.260.0060.00616.58
7.1.250.0000.01117.09
7.1.240.0030.01217.24
7.1.230.0030.00917.43
7.1.220.0160.00017.20
7.1.210.0080.00417.43
7.1.200.0040.01116.67
7.1.190.0030.00717.14
7.1.180.0060.00917.29
7.1.170.0000.01317.34
7.1.160.0070.01117.26
7.1.150.0060.00317.25
7.1.140.0090.00317.35
7.1.130.0040.00817.21
7.1.120.0080.00317.25
7.1.110.0090.00317.41
7.1.100.0030.01117.78
7.1.90.0100.00617.27
7.1.80.0030.01217.38
7.1.70.0060.00517.40
7.1.60.0080.01318.34
7.1.50.0080.01217.26
7.1.40.0040.00717.28
7.1.30.0070.00717.39
7.1.20.0040.01117.42
7.1.10.0100.00317.45
7.1.00.0030.04519.95
7.0.330.0060.00917.11
7.0.320.0060.00916.97
7.0.310.0030.00716.81
7.0.300.0000.01017.06
7.0.290.0070.00817.10
7.0.280.0030.00917.22
7.0.270.0030.01017.18
7.0.260.0030.00616.96
7.0.250.0040.00417.05
7.0.240.0070.00717.06
7.0.230.0090.00317.09
7.0.220.0040.00817.16
7.0.210.0100.00317.17
7.0.200.0030.00816.84
7.0.190.0070.00716.95
7.0.180.0060.00917.05
7.0.170.0080.00817.14
7.0.160.0070.01016.99
7.0.150.0100.00316.94
7.0.140.0140.03219.56
7.0.130.0040.01417.00
7.0.120.0080.00817.09
7.0.110.0080.00816.94
7.0.100.0030.01016.84
7.0.90.0040.00717.02
7.0.80.0070.00717.05
7.0.70.0040.04519.30
7.0.60.0080.04219.37
7.0.50.0090.04219.56
7.0.40.0030.02817.55
7.0.30.0020.04317.57
7.0.20.0020.04717.59
7.0.10.0070.04517.45
7.0.00.0030.02817.60
5.6.400.0060.00615.88
5.6.390.0090.00315.77
5.6.380.0040.00815.63
5.6.370.0100.00016.11
5.6.360.0040.01216.14
5.6.350.0030.01316.17
5.6.340.0060.00915.80
5.6.330.0000.01016.00
5.6.320.0040.01116.03
5.6.310.0090.00616.18
5.6.300.0060.00616.02
5.6.290.0040.00816.09
5.6.280.0070.03918.55
5.6.270.0040.00716.09
5.6.260.0070.00316.11
5.6.250.0100.00315.83
5.6.240.0070.00715.76
5.6.230.0030.00615.93
5.6.220.0020.04818.25
5.6.210.0000.03518.24
5.6.200.0040.04618.42
5.6.190.0040.03218.54
5.6.180.0040.02418.47
5.6.170.0040.04618.44
5.6.160.0070.02018.61
5.6.150.0080.04518.38
5.6.140.0120.04218.38
5.6.130.0030.05018.52
5.6.120.0040.04918.43
5.6.110.0070.04618.50
5.6.100.0100.02718.54
5.6.90.0050.04618.53
5.6.80.0050.04618.05
5.6.70.0070.02318.02
5.6.60.0070.03318.14
5.6.50.0050.04418.05
5.6.40.0030.04518.15
5.6.30.0080.04418.04
5.6.20.0020.04818.24
5.6.10.0050.04518.12
5.6.00.0080.03518.14
5.5.380.0040.01115.82
5.5.370.0100.00315.95
5.5.360.0040.03218.18
5.5.350.0130.04018.19
5.5.340.0080.03718.36
5.5.330.0110.04218.36
5.5.320.0000.02918.36
5.5.310.0070.03918.29
5.5.300.0030.05018.27
5.5.290.0030.03618.34
5.5.280.0000.05318.41
5.5.270.0030.02918.28
5.5.260.0050.04518.39
5.5.250.0050.03418.16
5.5.240.0080.04518.08
5.5.230.0050.03318.05
5.5.220.0030.04417.96
5.5.210.0080.04118.08
5.5.200.0050.04717.94
5.5.190.0030.03818.14
5.5.180.0070.04517.96
5.5.170.0000.01615.73
5.5.160.0050.03318.04
5.5.150.0030.04318.04
5.5.140.0040.04617.98
5.5.130.0060.02817.97
5.5.120.0050.04717.87
5.5.110.0090.03818.04
5.5.100.0100.02518.09
5.5.90.0090.03917.99
5.5.80.0070.03718.00
5.5.70.0070.03318.04
5.5.60.0060.04717.96
5.5.50.0040.03117.99
5.5.40.0100.03318.02
5.5.30.0000.04917.95
5.5.20.0040.04417.94
5.5.10.0000.04817.94
5.5.00.0020.04217.79
5.4.450.0030.04016.04
5.4.440.0040.04616.07
5.4.430.0070.02216.02
5.4.420.0020.04716.09
5.4.410.0020.04415.94
5.4.400.0090.03815.83
5.4.390.0030.03215.75
5.4.380.0050.03315.86
5.4.370.0050.03515.82
5.4.360.0100.04215.91
5.4.350.0050.04015.90
5.4.340.0050.03815.74
5.4.330.0070.00312.71
5.4.320.0110.03515.95
5.4.310.0060.03015.85
5.4.300.0040.04415.75
5.4.290.0040.04315.87
5.4.280.0040.02815.75
5.4.270.0050.03115.74
5.4.260.0020.02815.74
5.4.250.0130.03815.74
5.4.240.0060.03015.90
5.4.230.0080.02815.88
5.4.220.0040.04015.90
5.4.210.0060.03815.91
5.4.200.0060.03815.90
5.4.190.0040.03515.77
5.4.180.0040.04415.96
5.4.170.0050.02515.81
5.4.160.0070.03015.86
5.4.150.0050.04115.85
5.4.140.0060.03514.57
5.4.130.0020.03014.49
5.4.120.0030.04214.53
5.4.110.0000.02614.51
5.4.100.0070.02714.54
5.4.90.0050.03814.54
5.4.80.0040.03714.44
5.4.70.0070.03414.55
5.4.60.0070.03314.56
5.4.50.0040.02914.50
5.4.40.0070.03714.53
5.4.30.0030.03814.44
5.4.20.0050.03314.53
5.4.10.0040.02014.55
5.4.00.0020.03714.13
5.3.290.0020.03213.89
5.3.280.0070.04013.88
5.3.270.0020.04113.75
5.3.260.0020.02713.76
5.3.250.0030.02513.83
5.3.240.0060.04013.77
5.3.230.0050.04113.71
5.3.220.0030.04013.64
5.3.210.0080.02813.83
5.3.200.0060.04113.89
5.3.190.0040.04013.88
5.3.180.0020.04313.84
5.3.170.0040.03413.83
5.3.160.0040.02213.78
5.3.150.0040.04013.94
5.3.140.0050.02413.81
5.3.130.0030.04213.83
5.3.120.0070.04013.75
5.3.110.0020.02513.84
5.3.100.0060.03613.46
5.3.90.0040.03613.60
5.3.80.0000.02613.51
5.3.70.0020.02613.49
5.3.60.0030.02313.49
5.3.50.0050.02013.41
5.3.40.0050.02013.44
5.3.30.0020.02813.45
5.3.20.0020.01913.22
5.3.10.0020.03513.21
5.3.00.0000.02313.10
5.2.170.0000.03012.19
5.2.160.0070.02312.19
5.2.150.0030.03012.19
5.2.140.0000.03012.19
5.2.130.0000.03012.19
5.2.120.0070.02712.19
5.2.110.0030.03012.19
5.2.100.0030.06012.19
5.2.90.0030.03712.19
5.2.80.0030.04712.19
5.2.70.0030.03712.19
5.2.60.0030.02712.19
5.2.50.0030.02712.19
5.2.40.0000.03012.19
5.2.30.0000.03012.19
5.2.20.0030.03312.19
5.2.10.0000.03012.19
5.2.00.0000.03012.19
5.1.60.0030.05312.19
5.1.50.0000.05312.19
5.1.40.0030.04312.19
5.1.30.0030.02712.19
5.1.20.0070.05012.19
5.1.10.0100.05012.19
5.1.00.0030.04012.19
5.0.50.0030.02312.19
5.0.40.0000.04012.19
5.0.30.0000.06712.19
5.0.20.0000.03712.19
5.0.10.0000.02312.19
5.0.00.0030.02712.19
4.4.90.0000.03012.19
4.4.80.0000.01312.19
4.4.70.0000.01312.19
4.4.60.0000.01712.19
4.4.50.0000.01312.19
4.4.40.0000.03312.19
4.4.30.0030.01712.19
4.4.20.0000.03712.19
4.4.10.0000.04012.19
4.4.00.0000.05312.19
4.3.110.0000.02312.19
4.3.100.0030.01312.19
4.3.90.0000.01712.19
4.3.80.0000.02712.19
4.3.70.0030.02712.19
4.3.60.0000.03312.19
4.3.50.0000.01712.19
4.3.40.0000.03312.19
4.3.30.0000.01712.19
4.3.20.0000.02312.19
4.3.10.0000.02012.19
4.3.00.0030.01312.19

preferences:
37.25 ms | 403 KiB | 5 Q