xref: /PHP-8.2/Zend/tests/017.phpt (revision 852485d8)
1--TEST--
2builtin functions tests
3--FILE--
4<?php
5
6$fp = fopen(__FILE__, "r");
7var_dump(get_resource_type($fp));
8fclose($fp);
9var_dump(get_resource_type($fp));
10
11var_dump(gettype(get_loaded_extensions()));
12var_dump(count(get_loaded_extensions()));
13var_dump(gettype(get_loaded_extensions(true)));
14var_dump(count(get_loaded_extensions(true)));
15
16define("USER_CONSTANT", "test");
17
18var_dump(gettype(get_defined_constants(true)));
19var_dump(gettype(get_defined_constants()));
20var_dump(count(get_defined_constants()));
21
22function test () {
23}
24
25var_dump(gettype(get_defined_functions()));
26var_dump(count(get_defined_functions()));
27
28var_dump(gettype(get_declared_interfaces()));
29var_dump(count(get_declared_interfaces()));
30
31var_dump(get_extension_funcs(true));
32var_dump(gettype(get_extension_funcs("standard")));
33var_dump(count(get_extension_funcs("standard")));
34var_dump(gettype(get_extension_funcs("zend")));
35var_dump(count(get_extension_funcs("zend")));
36
37
38echo "Done\n";
39?>
40--EXPECTF--
41string(6) "stream"
42string(7) "Unknown"
43string(5) "array"
44int(%d)
45string(5) "array"
46int(%d)
47string(5) "array"
48string(5) "array"
49int(%d)
50string(5) "array"
51int(%d)
52string(5) "array"
53int(%d)
54bool(false)
55string(5) "array"
56int(%d)
57string(5) "array"
58int(%d)
59Done
60