curl_version_error.phpt 808 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Test curl_version() function : error conditions
  3. --SKIPIF--
  4. <?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
  5. --FILE--
  6. <?php
  7. /* Prototype : array curl_version ([ int $age ] )
  8. * Description: Returns information about the cURL version.
  9. * Source code: ext/curl/interface.c
  10. */
  11. echo "*** Testing curl_version() : error conditions ***\n";
  12. echo "\n-- Testing curl_version() function with more than expected no. of arguments --\n";
  13. $extra_arg = 10;
  14. var_dump( curl_version(1, $extra_arg) );
  15. ?>
  16. ===Done===
  17. --EXPECTF--
  18. *** Testing curl_version() : error conditions ***
  19. -- Testing curl_version() function with more than expected no. of arguments --
  20. Warning: curl_version() expects at most 1 parameter, 2 given in %s on line %d
  21. NULL
  22. ===Done===