3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(1) int(0) int(0)