fork(4) download
  1. <?php
  2.  
  3. "REGEXP_PHONE_NL",
  4. "/(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)/");
  5.  
  6. $string = "+316123456789"; //based on solution given in http://stackoverflow.com/questions/17949757/regular-expression-for-dutch-phone-number
  7.  
  8. echo(
  9. $string,
  10. FILTER_VALIDATE_REGEXP,
  11. "options" => array ("regexp" => REGEXP_PHONE_NL)
  12. )
  13. )
  14. );
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
+316123456789