3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = " \\begin{verbatim} dupa zbita \\end \\end{verbatim} I chuj!!! \\end{verbatim}"; preg_match_all('/\\\\begin\s*\{verbatim\}(?<content>.*?)\\\\end\s*\{verbatim\}/', $str, $match, PREG_OFFSET_CAPTURE); print_r($match);
Output for 4.4.6 - 4.4.9, 5.2.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => Array ( [0] => Array ( [0] => \begin{verbatim} dupa zbita \end \end{verbatim} [1] => 3 ) ) [content] => Array ( [0] => Array ( [0] => dupa zbita \end [1] => 19 ) ) [1] => Array ( [0] => Array ( [0] => dupa zbita \end [1] => 19 ) ) )
Output for 5.2.0 - 5.2.1
Warning: preg_match_all(): Compilation failed: unrecognized character after (?< at offset 25 in /in/LovHL on line 4
Output for 4.3.11 - 4.4.5, 5.0.0 - 5.1.6
Warning: preg_match_all(): Compilation failed: unrecognized character after (?< at offset 25 in /in/LovHL on line 4 Array ( )
Output for 4.3.3 - 4.3.10
Warning: Compilation failed: unrecognized character after (?< at offset 25 in /in/LovHL on line 4 Array ( )
Output for 4.3.0 - 4.3.2
Warning: Wrong value for parameter 4 in call to preg_match_all() in /in/LovHL on line 4