3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 - 7.1.0
<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.5, 5.0.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>