mb_regex_encoding_basic.phpt 799 B

1234567891011121314151617181920212223242526272829303132333435
  1. --TEST--
  2. Test mb_regex_encoding() function : basic functionality
  3. --SKIPIF--
  4. <?php
  5. extension_loaded('mbstring') or die('skip');
  6. function_exists('mb_regex_encoding') or die("skip mb_regex_encoding() is not available in this build");
  7. ?>
  8. --FILE--
  9. <?php
  10. /* Prototype : proto string mb_regex_encoding([string encoding])
  11. * Description: Returns the current encoding for regex as a string.
  12. * Source code: ext/mbstring/php_mbregex.c
  13. */
  14. /*
  15. * Test Basic functionality of mb_regex_encoding
  16. */
  17. echo "*** Testing mb_regex_encoding() : basic functionality ***\n";
  18. var_dump(mb_regex_encoding());
  19. var_dump(mb_regex_encoding('UTF-8'));
  20. var_dump(mb_regex_encoding());
  21. echo "Done";
  22. ?>
  23. --EXPECTF--
  24. *** Testing mb_regex_encoding() : basic functionality ***
  25. string(%d) "%s"
  26. bool(true)
  27. string(5) "UTF-8"
  28. Done