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