PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/good/ext/standard/tests/strings/add-and-stripslashes.php

http://github.com/facebook/hiphop-php
PHP | 14 lines | 13 code | 1 blank | 0 comment | 3 complexity | 2dec5cc564c401de0804659f38904861 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  1. <?hh
  2. <<__EntryPoint>> function main(): void {
  3. $input = '';
  4. for($i=0; $i<512; $i++) {
  5. $input .= chr($i%256);
  6. }
  7. echo "Normal: ";
  8. if($input === stripslashes(addslashes($input))) {
  9. echo "OK\n";
  10. } else {
  11. echo "FAILED\n";
  12. }
  13. }