fork download
  1. <?php
  2. function post_isset($indexes) {
  3. foreach($indexes as $index) if (!isset($_POST[$index])) return false;
  4. return true;
  5. }
  6. if (!post_isset(['nome', 'email'])) echo "deu erro";
  7.  
  8. //https://pt.stackoverflow.com/q/58355/101
Success #stdin #stdout 0.03s 24140KB
stdin
Standard input is empty
stdout
deu erro