Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / php / ext / standard / tests / strings / ord_error.phpt
blob455fb38972f236f1c1b8a39585fe4264a1aacba4
1 --TEST--
2 Test ord() function : error conditions
3 --FILE--
4 <?php
6 /* Prototype  : int ord  ( string $string  )
7  * Description: Return ASCII value of character
8  * Source code: ext/standard/string.c
9 */
11 echo "*** Testing ord() : error conditions ***\n";
13 echo "\n-- Testing ord() function with no arguments --\n";
14 var_dump( ord() );
16 echo "\n-- Testing ord() function with more than expected no. of arguments --\n";
17 $extra_arg = 10;
18 var_dump( ord(72, $extra_arg) );
21 ===DONE===
22 --EXPECTF--
23 *** Testing ord() : error conditions ***
25 -- Testing ord() function with no arguments --
27 Warning: ord() expects exactly 1 parameter, 0 given in %s on line %d
28 NULL
30 -- Testing ord() function with more than expected no. of arguments --
32 Warning: ord() expects exactly 1 parameter, 2 given in %s on line %d
33 NULL
34 ===DONE===