3v4l.org

run code in 300+ PHP versions simultaneously
<?php $m3u = '#EXTM3U #EXTINF:0 tvg-name="BBC" audio-track="eng" tvg-logo="http://mylogos.domain/BBC.png", BBC World http://server.name/stream/to/video2 #EXTINF:0 tvg-name="CNN" audio-track="rus", CNN International http://server.name/stream/to/video2 #EXTINF:0, Arirang http://server.name/stream/to/video3 #EXTINF:-1 tvg-id="http://www.arte.tv/" tvg-name="|ALLEMAGNE| ARTE ASTRA 19.2" tvg-logo="http://192.168.1.150/logotheque/arte_de.png" group-title="CULTURE ALLEMAGNE ASTRA 19.2",|ALLEMAGNE| ARTE ASTRA 19.2 http://192.168.1.150/1258'; $pattern = '~(*BSR_ANYCRLF) ^ \Q#EXTINF:\E (?<length> 0 | -1 | [1-9][0-9]* ) [ ]* (?<attributes> (?: [ ]* [\w-]+ =" [^"]* " \B )+ )? , [ ]* (?<title> .* \S ) [ ]* \R (?<url> .* \S ) ~xum'; preg_match_all($pattern, $m3u, $matches, PREG_SET_ORDER | PREG_UNMATCHED_AS_NULL); $results = []; $keys = array_flip(['length', 'attributes', 'title', 'url']); foreach($matches as $m) { if ( $m['attributes'] !== null ) { preg_match_all('~(?<name> [\w-]+ ) = " (?<value> [^"]* ) " ~x', $m['attributes'], $attr); $m['attributes'] = array_combine($attr['name'], $attr['value']); } $results[] = array_intersect_key($m, $keys); } print_r($results);

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.70.0220.00017.00
8.3.60.0120.00318.63
8.3.50.0070.00718.42
8.3.40.0170.00320.38
8.3.30.0170.00019.04
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.190.0060.01617.13
8.2.180.0080.00825.92
8.2.170.0110.00719.26
8.2.160.0070.01022.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00521.15
8.2.110.0000.01022.33
8.2.100.0040.00818.16
8.2.90.0000.00818.28
8.2.80.0040.00418.03
8.2.70.0030.00617.75
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00918.05
8.2.30.0020.00518.00
8.2.20.0050.00218.31
8.2.10.0000.00819.18
8.2.00.0020.00519.43
8.1.280.0100.01025.92
8.1.270.0040.00424.04
8.1.260.0070.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00622.59
8.1.230.0090.00321.04
8.1.220.0050.00318.02
8.1.210.0060.00319.14
8.1.200.0060.00317.72
8.1.190.0080.00017.60
8.1.180.0040.00418.10
8.1.170.0030.00518.83
8.1.160.0070.00019.07
8.1.150.0040.00418.80
8.1.140.0040.00417.70
8.1.130.0030.00519.07
8.1.120.0040.00417.65
8.1.110.0030.00517.65
8.1.100.0040.00417.51
8.1.90.0050.00217.66
8.1.80.0050.00317.71
8.1.70.0030.00317.58
8.1.60.0000.00817.76
8.1.50.0000.00817.70
8.1.40.0090.00317.67
8.1.30.0050.00317.68
8.1.20.0040.00417.91
8.1.10.0050.00317.80
8.1.00.0030.00517.60
8.0.300.0080.00020.16
8.0.290.0070.00017.00
8.0.280.0050.00218.48
8.0.270.0050.00317.14
8.0.260.0040.00418.57
8.0.250.0040.00317.11
8.0.240.0060.00317.10
8.0.230.0040.00417.10
8.0.220.0070.00017.18
8.0.210.0030.00317.08
8.0.200.0030.00317.21
8.0.190.0040.00417.21
8.0.180.0040.00417.21
8.0.170.0040.00417.20
8.0.160.0030.00717.14
8.0.150.0040.00417.03
8.0.140.0000.00817.09
8.0.130.0030.00313.59
8.0.120.0030.00717.29
8.0.110.0060.00217.25
8.0.100.0040.00417.09
8.0.90.0040.00317.16
8.0.80.0050.00217.15
8.0.70.0010.00617.05
8.0.60.0030.00417.08
8.0.50.0000.00817.15
8.0.30.0050.00217.25
8.0.20.0020.00617.26
8.0.10.0060.00117.30
8.0.00.0020.00617.32
7.4.330.0070.00015.55
7.4.320.0000.00716.80
7.4.300.0000.00716.72
7.4.290.0030.00516.88
7.4.280.0070.00016.95
7.4.270.0040.00416.81
7.4.260.0050.00316.95
7.4.250.0040.00416.79
7.4.240.0040.00417.02
7.4.230.0020.00516.96
7.4.220.0020.00616.92
7.4.210.0030.00316.96
7.4.200.0000.00716.93
7.4.190.0030.00316.92
7.4.180.0050.00216.76
7.4.160.0020.00516.71
7.4.150.0050.00216.72
7.4.140.0020.00516.76
7.4.130.0050.00216.90
7.4.120.0020.00616.72
7.4.110.0050.00216.67
7.4.100.0040.00416.79
7.4.90.0040.00316.71
7.4.80.0050.00316.77
7.4.70.0060.00216.67
7.4.60.0050.00216.75
7.4.50.0020.00616.65
7.4.40.0030.00516.72
7.4.30.0020.00516.91
7.4.20.0050.00216.66
7.4.10.0050.00216.60
7.4.00.0020.00516.71
7.3.330.0040.00316.58
7.3.320.0060.00013.49
7.3.310.0040.00416.52
7.3.300.0020.00516.60
7.3.290.0010.00616.62
7.3.280.0020.00516.50
7.3.270.0040.00416.51
7.3.260.0050.00216.59
7.3.250.0000.00716.60
7.3.240.0020.00616.56
7.3.230.0050.00216.49
7.3.220.0020.00616.45
7.3.210.0000.00816.55
7.3.200.0020.00616.53
7.3.190.0030.00316.47
7.3.180.0020.00516.51
7.3.170.0060.00116.47
7.3.160.0030.00316.46
7.3.150.0020.00516.54
7.3.140.0040.00316.45
7.3.130.0030.00316.37
7.3.120.0030.00416.52
7.3.110.0020.00516.48
7.3.100.0050.00216.49
7.3.90.0070.00016.75
7.3.80.0020.00516.53
7.3.70.0030.00316.54
7.3.60.0000.00716.58
7.3.50.0030.00316.71
7.3.40.0060.00116.63
7.3.30.0050.00216.70
7.3.20.0030.00317.58
7.3.10.0010.00617.47
7.3.00.0060.00217.44

preferences:
18.51 ms | 401 KiB | 5 Q