fork(6) download
  1. <?php
  2.  
  3. $aPhoneNumber = array(
  4. "+3999999999999",
  5. "003999999999999",
  6. "3999999999999",
  7. "39 99999999999",
  8. "+ 39 999 99999999",
  9. "0039 99999999999"
  10. );
  11.  
  12. foreach ($aPhoneNumber as $p) {
  13. print ereg_replace("^\+|^00|[^0-9]", "", $p) . "\n";
  14. }
  15.  
  16. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
3999999999999
3999999999999
3999999999999
3999999999999
3999999999999
3999999999999