add-and-stripslashes.phpt 278 B

1234567891011121314151617181920
  1. --TEST--
  2. addslashes() and stripslashes() functions
  3. --FILE--
  4. <?php
  5. $input = '';
  6. for($i=0; $i<512; $i++) {
  7. $input .= chr($i%256);
  8. }
  9. echo "Normal: ";
  10. if($input === stripslashes(addslashes($input))) {
  11. echo "OK\n";
  12. } else {
  13. echo "FAILED\n";
  14. }
  15. ?>
  16. --EXPECT--
  17. Normal: OK