rad2deg_error.phpt 553 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Test wrong number of arguments for rad2deg()
  3. --INI--
  4. precision = 14
  5. --FILE--
  6. <?php
  7. /*
  8. * proto float rad2deg(float number)
  9. * Function is implemented in ext/standard/math.c
  10. */
  11. $arg_0 = 1.0;
  12. $extra_arg = 1;
  13. echo "\nToo many arguments\n";
  14. var_dump(rad2deg($arg_0, $extra_arg));
  15. echo "\nToo few arguments\n";
  16. var_dump(rad2deg());
  17. ?>
  18. --EXPECTF--
  19. Too many arguments
  20. Warning: rad2deg() expects exactly 1 parameter, 2 given in %s on line %d
  21. NULL
  22. Too few arguments
  23. Warning: rad2deg() expects exactly 1 parameter, 0 given in %s on line %d
  24. NULL