3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function isPhoneNumber($number) { return preg_match("/^\+[0-9]{2}\.[0-9]{10}$/", $number); } var_dump(isPhoneNumber("+44.1202535689")); var_dump(isPhoneNumber("aaa+44.1202535689aa")); var_dump(isPhoneNumber("foo"));
Output for 4.3.0 - 7.2.0
int(1) int(0) int(0)