1--TEST-- 2builtin functions tests 3--FILE-- 4<?php 5 6var_dump(get_resource_type()); 7var_dump(get_resource_type("")); 8$fp = fopen(__FILE__, "r"); 9var_dump(get_resource_type($fp)); 10fclose($fp); 11var_dump(get_resource_type($fp)); 12 13var_dump(gettype(get_loaded_extensions())); 14var_dump(count(get_loaded_extensions())); 15var_dump(gettype(get_loaded_extensions(true))); 16var_dump(count(get_loaded_extensions(true))); 17var_dump(get_loaded_extensions(true, true)); 18 19define("USER_CONSTANT", "test"); 20 21var_dump(get_defined_constants(true, true)); 22var_dump(gettype(get_defined_constants(true))); 23var_dump(gettype(get_defined_constants())); 24var_dump(count(get_defined_constants())); 25 26function test () { 27} 28 29var_dump(gettype(get_defined_functions())); 30var_dump(count(get_defined_functions())); 31 32var_dump(get_declared_interfaces(true)); 33var_dump(gettype(get_declared_interfaces())); 34var_dump(count(get_declared_interfaces())); 35 36var_dump(get_extension_funcs()); 37var_dump(get_extension_funcs(true)); 38var_dump(gettype(get_extension_funcs("standard"))); 39var_dump(count(get_extension_funcs("standard"))); 40var_dump(gettype(get_extension_funcs("zend"))); 41var_dump(count(get_extension_funcs("zend"))); 42 43 44echo "Done\n"; 45?> 46--EXPECTF-- 47Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line %d 48NULL 49 50Warning: get_resource_type() expects parameter 1 to be resource, string given in %s on line %d 51NULL 52string(6) "stream" 53string(7) "Unknown" 54string(5) "array" 55int(%d) 56string(5) "array" 57int(%d) 58 59Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d 60NULL 61 62Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d 63NULL 64string(5) "array" 65string(5) "array" 66int(%d) 67string(5) "array" 68int(%d) 69 70Warning: get_declared_interfaces() expects exactly 0 parameters, 1 given in %s on line %d 71NULL 72string(5) "array" 73int(%d) 74 75Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line %d 76NULL 77bool(false) 78string(5) "array" 79int(%d) 80string(5) "array" 81int(%d) 82Done 83