1--TEST--
2Test get_defined_constants() function : basic functionality
3--FILE--
4<?php
5echo "*** Testing get_defined_constants() : basic functionality ***\n";
6
7var_dump(gettype(get_defined_constants(true)));
8var_dump(gettype(get_defined_constants()));
9
10$arr1 = get_defined_constants(false);
11$arr2 = get_defined_constants();
12var_dump(array_diff($arr1, $arr2));
13
14$n1 = count(get_defined_constants());
15define("USER_CONSTANT", "test");
16$arr2 = get_defined_constants();
17$n2 = count($arr2);
18
19if ($n2 == $n1 + 1 && array_key_exists("USER_CONSTANT", $arr2)) {
20    echo "TEST PASSED\n";
21} else {
22    echo "TEST FAILED\n";
23}
24
25?>
26--EXPECT--
27*** Testing get_defined_constants() : basic functionality ***
28string(5) "array"
29string(5) "array"
30array(0) {
31}
32TEST PASSED
33