3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function validateMobile($mobile, &$mathed){ return preg_match("/^1[345789]\d{9}$/", $mobile, $mathed); } var_dump(validateMobile('15905199150', $mathed)); var_dump($mathed);
based on nCCWM
Output for 5.3.19 - 5.6.28, 7.0.3 - 7.2.0
int(1) array(1) { [0]=> string(11) "15905199150" }
Output for 7.0.0 - 7.0.2
int(0) array(0) { }