3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $pattern = '/\bzug\b/ui'; $sample = 'zugänglich'; echo (int)preg_match( $pattern, $sample, $matches).PHP_EOL; print_r($matches);
based on 7HurJ
Output for 5.3.4 - 7.1.0
0 Array ( )
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.3.3
1 Array ( [0] => zug )
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/l0lQU on line 4 1PHP_EOLArray ( [0] => zug )