Annotation of embedaddon/php/ext/standard/tests/math/sin_error.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test wrong number of arguments for sin()
! 3: --FILE--
! 4: <?php
! 5: /*
! 6: * proto float sin(float number)
! 7: * Function is implemented in ext/standard/math.c
! 8: */
! 9:
! 10: $arg_0 = 1.0;
! 11: $extra_arg = 1;
! 12:
! 13: echo "\nToo many arguments\n";
! 14: var_dump(sin($arg_0, $extra_arg));
! 15:
! 16: echo "\nToo few arguments\n";
! 17: var_dump(sin());
! 18:
! 19: ?>
! 20: --EXPECTF--
! 21: Too many arguments
! 22:
! 23: Warning: sin() expects exactly 1 parameter, 2 given in %s on line %d
! 24: NULL
! 25:
! 26: Too few arguments
! 27:
! 28: Warning: sin() expects exactly 1 parameter, 0 given in %s on line %d
! 29: NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>