3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php foreach ($strings as $string) { if(preg_match('/^NPWP:?\s*(\d+)/', $string, $matches)) { echo $matches[1]; } }
based on 13Cmm
Output for 5.6.30, 7.0.30 - 7.3.0alpha1
Notice: Undefined variable: strings in /in/JMZAq on line 3 Warning: Invalid argument supplied for foreach() in /in/JMZAq on line 3
Output for hhvm-3.22.0
Notice: Undefined variable: strings in /in/JMZAq on line -1 Warning: Invalid argument supplied for foreach() in /in/JMZAq on line -1
Output for hhvm-3.18.5 - 3.21.3
Notice: Undefined variable: strings in /in/JMZAq on line 7 Warning: Invalid argument supplied for foreach() in /in/JMZAq on line 7