1--TEST--
2Test get_object_vars() function : error conditions - wrong number of args
3--FILE--
4<?php
5/* Prototype  : proto array get_object_vars(object obj)
6 * Description: Returns an array of object properties
7 * Source code: Zend/zend_builtin_functions.c
8 * Alias to functions:
9 */
10
11echo "*** Testing get_object_vars() : error conditions ***\n";
12
13// Zero arguments
14echo "\n-- Testing get_object_vars() function with Zero arguments --\n";
15var_dump( get_object_vars() );
16
17//Test get_object_vars with one more than the expected number of arguments
18echo "\n-- Testing get_object_vars() function with more than expected no. of arguments --\n";
19$obj = new stdclass();
20$extra_arg = 10;
21var_dump( get_object_vars($obj, $extra_arg) );
22
23echo "Done";
24?>
25--EXPECTF--
26*** Testing get_object_vars() : error conditions ***
27
28-- Testing get_object_vars() function with Zero arguments --
29
30Warning: get_object_vars() expects exactly 1 parameter, 0 given in %s on line 12
31NULL
32
33-- Testing get_object_vars() function with more than expected no. of arguments --
34
35Warning: get_object_vars() expects exactly 1 parameter, 2 given in %s on line 18
36NULL
37Done