Revert "make hphpc able to use ini files"
[hiphop-php.git] / hphp / test / zend / bad / ext / standard / tests / array / rsort_error.php
blob6d0ffdc5736175fb3c1173d5ceab57f85a818cda
1 <?php
2 /* Prototype : bool rsort(array &$array_arg [, int $sort_flags])
3 * Description: Sort an array in reverse order
4 * Source code: ext/standard/array.c
5 */
7 /*
8 * Pass incorrect number of arguments to rsort() to test behaviour
9 */
11 echo "*** Testing rsort() : error conditions ***\n";
13 // zero arguments
14 echo "\n-- Testing rsort() function with Zero arguments --\n";
15 var_dump( rsort() );
17 //Test rsort() with more than the expected number of arguments
18 echo "\n-- Testing rsort() function with more than expected no. of arguments --\n";
19 $array_arg = array(1, 2);
20 $sort_flags = SORT_REGULAR;
21 $extra_arg = 10;
22 var_dump( rsort($array_arg, $sort_flags, $extra_arg) );
24 // dump the input array to ensure that it wasn't changed
25 var_dump($array_arg);
27 echo "Done";