get_defined_functions_error.phpt 809 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Test get_defined_functions() function : error conditions
  3. --FILE--
  4. <?php
  5. /* Prototype : array get_defined_functions ( $exclude_disabled = false )
  6. * Description: Gets an array of all defined functions.
  7. * Source code: Zend/zend_builtin_functions.c
  8. */
  9. echo "*** Testing get_defined_functions() : error conditions ***\n";
  10. echo "\n-- Testing get_defined_functions() function with more than expected no. of arguments --\n";
  11. $extra_arg = 10;
  12. $extra_arg2 = 20;
  13. var_dump( get_defined_functions($extra_arg, $extra_arg2) );
  14. ?>
  15. ===Done===
  16. --EXPECTF--
  17. *** Testing get_defined_functions() : error conditions ***
  18. -- Testing get_defined_functions() function with more than expected no. of arguments --
  19. Warning: get_defined_functions() expects at most 1 parameter, 2 given in %s on line %d
  20. NULL
  21. ===Done===