1--TEST--
2Test array_flip() function : error conditions
3--FILE--
4<?php
5/* Prototype  : array array_flip(array $input)
6 * Description: Return array with key <-> value flipped
7 * Source code: ext/standard/array.c
8*/
9
10echo "*** Testing array_flip() : error conditions ***\n";
11
12// Zero arguments
13echo "-- Testing array_flip() function with Zero arguments --\n";
14var_dump( array_flip() );
15
16//one more than the expected number of arguments
17echo "-- Testing array_flip() function with more than expected no. of arguments --\n";
18$input = array(1 => 'one', 2 => 'two');
19$extra_arg = 10;
20var_dump( array_flip($input, $extra_arg) );
21
22echo "Done"
23?>
24--EXPECTF--
25*** Testing array_flip() : error conditions ***
26-- Testing array_flip() function with Zero arguments --
27
28Warning: array_flip() expects exactly 1 parameter, 0 given in %s on line %d
29NULL
30-- Testing array_flip() function with more than expected no. of arguments --
31
32Warning: array_flip() expects exactly 1 parameter, 2 given in %s on line %d
33NULL
34Done
35