mysql_get_proto_info.phpt 998 B

1234567891011121314151617181920212223242526272829303132333435
  1. --TEST--
  2. mysql_get_proto_info()
  3. --SKIPIF--
  4. <?php
  5. require_once('skipif.inc');
  6. require_once('skipifconnectfailure.inc');
  7. ?>
  8. --FILE--
  9. <?php
  10. include_once "connect.inc";
  11. if (NULL !== ($tmp = @mysql_get_proto_info(NULL)))
  12. printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
  13. require "table.inc";
  14. if (!is_int($info = mysql_get_proto_info($link)) || (0 === $info))
  15. printf("[003] Expecting int/any_non_empty, got %s/%s\n", gettype($info), $info);
  16. if (!is_int($info2 = mysql_get_proto_info()) || (0 === $info2))
  17. printf("[004] Expecting int/any_non_empty, got %s/%s\n", gettype($info2), $info2);
  18. assert($info === $info2);
  19. if (NULL !== ($tmp = @mysql_get_proto_info('too many', 'arguments')))
  20. printf("[005] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
  21. print "done!";
  22. ?>
  23. --CLEAN--
  24. <?php
  25. require_once("clean_table.inc");
  26. ?>
  27. --EXPECTF--
  28. Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d
  29. done!