fork download
  1. <?php
  2. $text = 'Não sou zalgo, só tenho alguns acentos, tá bom?';
  3.  
  4. // não entendi pra que testar a mesma regex 2 vezes...
  5. if ( preg_match ( '/[^\x20-\x7E]/', $text ) || preg_match ( '/[^\x20-\x7E]/', $text ) ) {
  6. die('ZALGO not allowed');
  7. }
  8.  
Success #stdin #stdout 0.02s 24484KB
stdin
Standard input is empty
stdout
ZALGO not allowed