3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //$phone = "841657196818"; //$phone = "841657336818"; if(preg_match("/^([1-9]{2})[0-9]{8|9|10}$/", $phone)) { echo "$phone Valid"; } else { echo "$phone Invalid."; }
based on mTYOB
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: phone in /in/GtKeV on line 6 Notice: Undefined variable: phone in /in/GtKeV on line 9 Invalid.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: phone in /in/GtKeV on line 6 Notice: Undefined variable: phone in /in/GtKeV on line 9 Invalid.