mysql_get_client_info.phpt 592 B

1234567891011121314151617181920212223
  1. --TEST--
  2. mysql_get_client_info()
  3. --SKIPIF--
  4. <?php require_once('skipif.inc'); ?>
  5. --FILE--
  6. <?php
  7. include "connect.inc";
  8. if (!is_string($info = mysql_get_client_info()) || ('' === $info))
  9. printf("[001] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
  10. if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($info)) {
  11. printf("[002] Expecting Unicode!\n");
  12. var_inspect($info);
  13. }
  14. if (!is_null($tmp = @mysql_get_client_info("too many arguments"))) {
  15. printf("[003] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
  16. }
  17. print "done!";
  18. ?>
  19. --EXPECTF--
  20. done!