parse_str_basic2.phpt 639 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Test parse_str() function : non-default arg_separator.input specified
  3. --INI--
  4. arg_separator.input = "/"
  5. --FILE--
  6. <?php
  7. /* Prototype : void parse_str ( string $str [, array &$arr ] )
  8. * Description: Parses the string into variables
  9. * Source code: ext/standard/string.c
  10. */
  11. echo "*** Testing parse_str() : non-default arg_separator.input specified ***\n";
  12. $s1 = "first=val1/second=val2/third=val3";
  13. var_dump(parse_str($s1));
  14. var_dump($first, $second, $third);
  15. ?>
  16. ===DONE===
  17. --EXPECTF--
  18. *** Testing parse_str() : non-default arg_separator.input specified ***
  19. NULL
  20. string(4) "val1"
  21. string(4) "val2"
  22. string(4) "val3"
  23. ===DONE===