bug53251.phpt 583 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Bug #53251 (bindtextdomain with null dir doesn't return old value)
  3. --EXTENSIONS--
  4. gettext
  5. --SKIPIF--
  6. <?php
  7. if (getenv('SKIP_REPEAT')) die('skip gettext leaks global state across requests');
  8. ?>
  9. --FILE--
  10. <?php
  11. var_dump(is_string(bindtextdomain('foo', null)));
  12. $dir = bindtextdomain('foo', '.');
  13. var_dump(bindtextdomain('foo', null) === $dir);
  14. var_dump(bind_textdomain_codeset('foo', null));
  15. var_dump(bind_textdomain_codeset('foo', 'UTF-8'));
  16. var_dump(bind_textdomain_codeset('foo', null));
  17. ?>
  18. --EXPECT--
  19. bool(true)
  20. bool(true)
  21. bool(false)
  22. string(5) "UTF-8"
  23. string(5) "UTF-8"