1--TEST--
2Test array_values() function (errors)
3--INI--
4precision=14
5--FILE--
6<?php
7
8echo "\n*** Testing error conditions ***\n";
9/* Invalid number of args */
10var_dump( array_values() );  // Zero arguments
11var_dump( array_values(array(1,2,3), "") );  // No. of args > expected
12/* Invalid types */
13var_dump( array_values("") );  // Empty string
14var_dump( array_values(100) );  // Integer
15var_dump( array_values(new stdclass) );  // object
16
17echo "Done\n";
18?>
19--EXPECTF--
20*** Testing error conditions ***
21
22Warning: array_values() expects exactly 1 parameter, 0 given in %s on line %d
23NULL
24
25Warning: array_values() expects exactly 1 parameter, 2 given in %s on line %d
26NULL
27
28Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
29NULL
30
31Warning: array_values() expects parameter 1 to be array, integer given in %s on line %d
32NULL
33
34Warning: array_values() expects parameter 1 to be array, object given in %s on line %d
35NULL
36Done
37