3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $subject = '512345678'; $failingPattern = '/^([3-5789]\d{8})$/x'; $result = preg_match($failingPattern , $subject, $groups, PREG_OFFSET_CAPTURE); var_dump($result, $groups);
based on 0SMiZ
Output for 5.3.19 - 5.6.28, 7.0.3 - 7.2.0
int(1) array(2) { [0]=> array(2) { [0]=> string(9) "512345678" [1]=> int(0) } [1]=> array(2) { [0]=> string(9) "512345678" [1]=> int(0) } }
Output for 7.0.0 - 7.0.2
int(0) array(0) { }