3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( array( '|174|September|2001|', '|Pengantar=Hello!!!!', '|Tema= Sami Mawon', '|Tema_isi=meet you!!!', '|Kutip=people', '|Kutip_kitab=Efesus', '|Kutip_pasal=4', '|Kutip_ayat=28', '|Tema_sumber=Kiriman dari Maurits albert (romind@ )', '[[Kategori:e-humor 2001]]', ) ); $pattern = '/(?<first>\w+)[:=](?<rest>[\d|\w|\s]+)/'; $matches = array(); foreach ($a as $_arrEach) { foreach ($_arrEach as $_each) { $result = preg_match($pattern, $_each, $matches[]); } } echo "<pre>"; print_r($matches); echo "</pre>";
Output for 4.4.6 - 4.4.9, 5.2.2 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
<pre>Array ( [0] => Array ( ) [1] => Array ( [0] => Pengantar=Hello [first] => Pengantar [1] => Pengantar [rest] => Hello [2] => Hello ) [2] => Array ( [0] => Tema= Sami Mawon [first] => Tema [1] => Tema [rest] => Sami Mawon [2] => Sami Mawon ) [3] => Array ( [0] => Tema_isi=meet you [first] => Tema_isi [1] => Tema_isi [rest] => meet you [2] => meet you ) [4] => Array ( [0] => Kutip=people [first] => Kutip [1] => Kutip [rest] => people [2] => people ) [5] => Array ( [0] => Kutip_kitab=Efesus [first] => Kutip_kitab [1] => Kutip_kitab [rest] => Efesus [2] => Efesus ) [6] => Array ( [0] => Kutip_pasal=4 [first] => Kutip_pasal [1] => Kutip_pasal [rest] => 4 [2] => 4 ) [7] => Array ( [0] => Kutip_ayat=28 [first] => Kutip_ayat [1] => Kutip_ayat [rest] => 28 [2] => 28 ) [8] => Array ( [0] => Tema_sumber=Kiriman dari Maurits albert [first] => Tema_sumber [1] => Tema_sumber [rest] => Kiriman dari Maurits albert [2] => Kiriman dari Maurits albert ) [9] => Array ( [0] => Kategori:e [first] => Kategori [1] => Kategori [rest] => e [2] => e ) ) </pre>
Output for 5.2.0 - 5.2.1
Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 <pre>Array ( [0] => [1] => [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] => ) </pre>
Output for 4.3.11, 4.4.0 - 4.4.5, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 <pre>Array ( [0] => Array ( ) [1] => Array ( ) [2] => Array ( ) [3] => Array ( ) [4] => Array ( ) [5] => Array ( ) [6] => Array ( ) [7] => Array ( ) [8] => Array ( ) [9] => Array ( ) ) </pre>
Output for 4.3.0 - 4.3.10
Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 Warning: Compilation failed: unrecognized character after (?< at offset 3 in /in/EYkWA on line 20 <pre>Array ( [0] => Array ( ) [1] => Array ( ) [2] => Array ( ) [3] => Array ( ) [4] => Array ( ) [5] => Array ( ) [6] => Array ( ) [7] => Array ( ) [8] => Array ( ) [9] => Array ( ) ) </pre>

preferences:
298.75 ms | 404 KiB | 379 Q