fork(2) download
  1. <?php
  2. $name = "Грозный";
  3.  
  4. if (!preg_match('/^[a-zA-Zа-яА-Я\-\'\ ]{1,20}$/u', $name, $matches)) {
  5. $error = "Incorrect name type: name contains invalid characters (valid characters is english or russian letters, hyphens, apostrophes and spaces).";
  6. }
  7.  
  8. echo $error;
Success #stdin #stdout #stderr 0.02s 52472KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined variable: error in /home/ADRkT8/prog.php on line 8