3v4l.org

run code in 300+ PHP versions simultaneously
<?php $feeds = [ ['feed_image' => [ '<a href="http://52.1.47.143/photo/928/2_onclick_ok/userid_244/" class=" js_photo_item_928 photo_holder_image" rel="928" ><img src="http://52.1.47.143/file/pic/photo/2015/04/9bd387c6442135834298d6a17b3f9555_240.jpg" alt="" width="180" height="160" class="photo_holder" /></a><br />', '<a href="http://52.1.47.143/photo/927/8/userid_244/" class=" js_photo_item_928 photo_holder_image" rel="927"><img src="http://52.1.47.143/file/pic/photo/2015/04/6eb60ee0e258223ef72a9a632d0ce429_240.png" alt="" height="84" width="150" class="photo_holder" userid="244" /></a>', 'hufflebuff' ] ], ['some other array'] ]; $result = []; foreach($feeds as $index => $feed) { if(isset($feed['feed_image']) && is_array($feed['feed_image'])) { $result[$index] = array_map(function($item) { preg_match('/src=\"[\\w\\:\\/\\.]+photo\\/(?<url>[^[:space:]\"]+)/i', $item, $matches); return isset($matches['url']) ? $matches['url'] : false; }, $feed['feed_image']); // remove all items that had no url matched. Remove this line if you know that there is always a match $result[$index] = array_filter($result[$index]); } } var_dump($result);

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.0150.00316.87
8.3.50.0080.01022.08
8.3.40.0150.00018.96
8.3.30.0080.00619.13
8.3.20.0080.00020.16
8.3.10.0080.00021.95
8.3.00.0060.00319.63
8.2.180.0060.00918.53
8.2.170.0150.00022.96
8.2.160.0090.00622.38
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0100.00026.16
8.2.120.0030.00619.73
8.2.110.0030.00719.17
8.2.100.0040.00817.88
8.2.90.0080.00019.21
8.2.80.0050.00317.97
8.2.70.0110.00017.71
8.2.60.0050.00318.05
8.2.50.0040.00418.07
8.2.40.0030.00520.01
8.2.30.0030.00518.05
8.2.20.0040.00417.99
8.2.10.0090.00018.22
8.2.00.0050.00317.94
8.1.280.0140.00725.92
8.1.270.0030.00520.73
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00323.89
8.1.230.0080.00417.78
8.1.220.0050.00317.80
8.1.210.0030.00618.77
8.1.200.0060.00317.48
8.1.190.0000.00817.48
8.1.180.0040.00418.10
8.1.170.0040.00418.71
8.1.160.0000.00822.00
8.1.150.0050.00218.83
8.1.140.0070.00017.54
8.1.130.0030.00317.77
8.1.120.0000.00717.52
8.1.110.0040.00417.64
8.1.100.0030.00517.50
8.1.90.0040.00417.53
8.1.80.0040.00417.67
8.1.70.0000.00817.54
8.1.60.0030.00617.71
8.1.50.0050.00317.58
8.1.40.0080.00017.69
8.1.30.0000.00817.76
8.1.20.0040.00417.81
8.1.10.0000.00817.77
8.1.00.0000.00817.69
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0020.00518.41
8.0.270.0030.00317.35
8.0.260.0000.00717.29
8.0.250.0030.00317.12
8.0.240.0030.00317.01
8.0.230.0000.00717.12
8.0.220.0040.00416.96
8.0.210.0050.00216.94
8.0.200.0030.00316.98
8.0.190.0030.00616.98
8.0.180.0040.00417.08
8.0.170.0030.00617.09
8.0.160.0080.00017.02
8.0.150.0070.00016.90
8.0.140.0000.00716.90
8.0.130.0040.00413.47
8.0.120.0050.00316.99
8.0.110.0050.00217.04
8.0.100.0000.00817.16
8.0.90.0040.00417.11
8.0.80.0130.01016.99
8.0.70.0050.00317.11
8.0.60.0040.00416.95
8.0.50.0050.00317.09
8.0.30.0110.01117.23
8.0.20.0060.01317.41
8.0.10.0000.00817.24
8.0.00.0100.00717.10
7.4.330.0050.00015.03
7.4.320.0060.00016.87
7.4.300.0070.00016.73
7.4.290.0070.00016.83
7.4.280.0000.00716.82
7.4.270.0070.00016.83
7.4.260.0080.00016.83
7.4.250.0040.00416.77
7.4.240.0000.00816.70
7.4.230.0000.00816.83
7.4.220.0060.01216.77
7.4.210.0070.00816.79
7.4.200.0050.00216.72
7.4.160.0190.00016.75
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0100.01116.78
7.4.120.0080.00816.65
7.4.110.0170.00716.61
7.4.100.0140.01016.61
7.4.90.0130.00916.88
7.4.80.0060.01619.39
7.4.70.0100.00716.71
7.4.60.0150.00316.66
7.4.50.0000.00516.34
7.4.40.0090.01216.56
7.4.30.0110.01116.88
7.4.00.0060.01014.96
7.3.330.0000.00513.34
7.3.320.0100.00513.47
7.3.310.0000.00716.57
7.3.300.0000.00716.37
7.3.290.0030.00316.38
7.3.280.0080.01116.46
7.3.270.0140.00717.40
7.3.260.0130.00316.69
7.3.250.0020.01716.88
7.3.240.0110.00616.66
7.3.230.0130.00616.50
7.3.210.0070.01716.77
7.3.200.0120.00419.39
7.3.190.0130.00316.73
7.3.180.0130.01016.52
7.3.170.0150.00616.48
7.3.160.0080.00816.47
7.3.120.0030.01314.98
7.3.110.0100.01014.97
7.3.100.0160.00015.19
7.3.90.0100.00715.32
7.3.80.0140.00015.38
7.3.70.0090.00015.13
7.3.60.0030.01215.00
7.3.50.0040.00815.10
7.3.40.0060.00614.97
7.3.30.0000.01414.90
7.3.20.0100.00616.91
7.3.10.0080.00316.94
7.3.00.0100.00716.57
7.2.330.0130.00616.80
7.2.320.0050.01116.89
7.2.310.0120.00616.77
7.2.300.0070.01017.05
7.2.290.0030.02116.86
7.2.250.0090.00915.39
7.2.240.0130.00715.36
7.2.230.0100.00715.32
7.2.220.0030.01115.27
7.2.210.0000.01415.27
7.2.200.0030.01214.98
7.2.190.0090.00615.32
7.2.180.0000.01315.33
7.2.170.0100.00315.27
7.2.00.0060.00919.57
7.1.330.0040.01116.07
7.1.320.0040.00816.23
7.1.310.0030.00716.12
7.1.300.0100.00315.66
7.1.290.0060.00616.16
7.1.280.0060.00616.03
7.1.270.0070.00715.93
7.1.260.0000.01415.99
7.1.100.0030.00617.98
7.1.70.0000.00717.26
7.1.60.0150.01119.50
7.1.50.0070.01517.21
7.1.00.0100.06722.56
7.0.200.0210.00716.73
7.0.140.0070.03322.15
7.0.100.0070.06321.82
7.0.90.0130.06721.77
7.0.80.0070.05721.68
7.0.70.0000.08721.66
7.0.60.0070.07721.77
7.0.50.0030.03322.05
7.0.40.0030.06720.03
7.0.30.0000.04020.05
7.0.20.0070.03320.11
7.0.10.0000.07019.98
7.0.00.0000.06020.15
5.6.280.0070.07020.90
5.6.250.0070.03320.50
5.6.240.0000.07320.48
5.6.230.0000.08020.62
5.6.220.0030.04320.59
5.6.210.0000.05720.52
5.6.200.0030.03720.95
5.6.190.0000.08321.04
5.6.180.0030.03721.11
5.6.170.0130.07321.18
5.6.160.0000.08721.01
5.6.150.0030.06721.18
5.6.140.0070.07720.96
5.6.130.0070.06321.03
5.6.120.0030.06321.11
5.6.110.0000.08021.10
5.6.100.0130.02721.13
5.6.90.0100.07020.90
5.6.80.0070.07720.55
5.6.70.0100.03020.34
5.6.60.0130.05020.37
5.6.50.0070.06320.34
5.6.40.0030.06720.49
5.6.30.0070.05020.47
5.6.20.0000.03720.30
5.6.10.0030.08020.43
5.6.00.0100.06720.38
5.5.380.0070.06720.36
5.5.370.0070.07720.39
5.5.360.0030.06020.38
5.5.350.0030.05720.48
5.5.340.0030.08320.63
5.5.330.0070.06320.93
5.5.320.0030.03320.73
5.5.310.0000.05320.84
5.5.300.0130.02720.76
5.5.290.0070.08320.85
5.5.280.0000.08320.89
5.5.270.0030.04020.86
5.5.260.0030.04320.77
5.5.250.0030.03320.59
5.5.240.0030.05020.27
5.5.230.0070.07020.25
5.5.220.0030.06320.16
5.5.210.0100.07020.30
5.5.200.0030.03320.09
5.5.190.0030.07720.27
5.5.180.0070.07020.25
5.5.160.0070.07720.14
5.5.150.0070.07720.23
5.5.140.0070.06320.21
5.5.130.0030.08020.14
5.5.120.0030.07720.27
5.5.110.0030.04320.23
5.5.100.0130.07020.18
5.5.90.0070.05720.10
5.5.80.0070.03720.07
5.5.70.0030.07020.15
5.5.60.0000.04320.14
5.5.50.0000.07719.94
5.5.40.0030.08020.06
5.5.30.0030.07720.06
5.5.20.0100.07019.94
5.5.10.0000.07020.05
5.5.00.0070.03720.02
5.4.450.0070.07719.28
5.4.440.0030.03719.44
5.4.430.0030.04019.45
5.4.420.0030.06019.23
5.4.410.0000.07719.24
5.4.400.0000.03719.12
5.4.390.0100.06019.16
5.4.380.0030.07319.02
5.4.370.0030.07018.87
5.4.360.0070.03019.23
5.4.350.0070.03318.88
5.4.340.0000.05719.05
5.4.320.0030.08018.92
5.4.310.0000.06319.05
5.4.300.0000.03719.14
5.4.290.0000.07019.17
5.4.280.0030.05318.95
5.4.270.0100.08719.13
5.4.260.0030.04719.03
5.4.250.0000.07719.04
5.4.240.0070.05319.12
5.4.230.0000.07719.04
5.4.220.0030.07719.07
5.4.210.0070.07318.89
5.4.200.0030.06318.84
5.4.190.0100.05319.16
5.4.180.0030.05319.22
5.4.170.0070.03019.03
5.4.160.0030.05318.85
5.4.150.0130.06319.03
5.4.140.0030.06716.37
5.4.130.0030.04716.37
5.4.120.0000.05716.36
5.4.110.0070.05316.45
5.4.100.0070.06716.45
5.4.90.0070.04716.38
5.4.80.0030.02716.47
5.4.70.0030.03316.26
5.4.60.0030.06316.45
5.4.50.0070.06016.32
5.4.40.0100.02316.48
5.4.30.0030.03316.44
5.4.20.0000.03016.43
5.4.10.0030.07016.31
5.4.00.0100.05715.85
5.3.290.0030.08315.59
5.3.280.0070.05315.59
5.3.270.0030.03715.59
5.3.260.0070.07315.59
5.3.250.0000.08315.59
5.3.240.0000.06715.59
5.3.230.0000.03315.59
5.3.220.0100.06315.59
5.3.210.0000.07715.59
5.3.200.0000.03315.59
5.3.190.0030.03315.59
5.3.180.0000.03315.59
5.3.170.0000.04315.59
5.3.160.0000.03315.59
5.3.150.0030.04715.59
5.3.140.0070.05315.59
5.3.130.0030.03015.59
5.3.120.0000.07315.59
5.3.110.0000.04315.59
5.3.100.0000.04015.59
5.3.90.0070.02715.59
5.3.80.0000.07015.59
5.3.70.0000.04315.59
5.3.60.0070.03015.59
5.3.50.0000.07315.59
5.3.40.0000.07315.59
5.3.30.0000.06715.59
5.3.20.0030.04315.59
5.3.10.0000.03315.59
5.3.00.0000.07015.59
5.2.170.0000.02715.59
5.2.160.0030.02715.59
5.2.150.0030.06015.59
5.2.140.0000.06015.59
5.2.130.0030.05715.59
5.2.120.0000.04315.59
5.2.110.0000.04315.59
5.2.100.0030.05715.59
5.2.90.0070.04715.59
5.2.80.0070.04715.59
5.2.70.0000.06315.59
5.2.60.0070.05015.59
5.2.50.0030.04715.59
5.2.40.0030.05015.59
5.2.30.0030.05715.59
5.2.20.0030.05715.59
5.2.10.0070.02015.59
5.2.00.0000.03315.59
5.1.60.0030.03315.59
5.1.50.0070.03315.59
5.1.40.0000.02015.59
5.1.30.0030.05315.59
5.1.20.0000.03715.59
5.1.10.0030.05315.59
5.1.00.0000.04715.59
5.0.50.0000.04715.59
5.0.40.0030.01315.59
5.0.30.0030.05315.59
5.0.20.0000.01715.59
5.0.10.0100.03315.59
5.0.00.0070.04015.59
4.4.90.0000.03715.59
4.4.80.0000.03315.59
4.4.70.0070.02715.59
4.4.60.0000.03315.59
4.4.50.0030.01715.59
4.4.40.0030.05015.59
4.4.30.0000.03315.59
4.4.20.0070.02715.59
4.4.10.0000.02715.59
4.4.00.0000.05715.59
4.3.110.0030.02315.59
4.3.100.0000.04715.59
4.3.90.0030.02715.59
4.3.80.0070.01715.59
4.3.70.0000.01315.59
4.3.60.0000.03015.59
4.3.50.0030.03015.59
4.3.40.0000.04715.59
4.3.30.0070.03015.59
4.3.20.0000.03315.59
4.3.10.0000.03715.59
4.3.00.0000.03015.59

preferences:
50.57 ms | 401 KiB | 5 Q