2006-11-21 19:11:39 +08:00
|
|
|
--TEST--
|
|
|
|
builtin functions tests
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
var_dump(get_resource_type());
|
|
|
|
var_dump(get_resource_type(""));
|
|
|
|
$fp = fopen(__FILE__, "r");
|
|
|
|
var_dump(get_resource_type($fp));
|
|
|
|
fclose($fp);
|
|
|
|
var_dump(get_resource_type($fp));
|
|
|
|
|
|
|
|
var_dump(gettype(get_loaded_extensions()));
|
|
|
|
var_dump(count(get_loaded_extensions()));
|
2007-08-03 00:54:44 +08:00
|
|
|
var_dump(gettype(get_loaded_extensions(true)));
|
2007-08-01 06:47:25 +08:00
|
|
|
var_dump(count(get_loaded_extensions(true)));
|
2007-08-03 00:54:44 +08:00
|
|
|
var_dump(get_loaded_extensions(true, true));
|
2006-11-21 19:11:39 +08:00
|
|
|
|
|
|
|
define("USER_CONSTANT", "test");
|
|
|
|
|
|
|
|
var_dump(get_defined_constants(true, true));
|
|
|
|
var_dump(gettype(get_defined_constants(true)));
|
|
|
|
var_dump(gettype(get_defined_constants()));
|
|
|
|
var_dump(count(get_defined_constants()));
|
|
|
|
|
|
|
|
function test () {
|
|
|
|
}
|
|
|
|
|
|
|
|
var_dump(get_defined_functions(true));
|
|
|
|
var_dump(gettype(get_defined_functions()));
|
|
|
|
var_dump(count(get_defined_functions()));
|
|
|
|
|
|
|
|
var_dump(get_declared_interfaces(true));
|
|
|
|
var_dump(gettype(get_declared_interfaces()));
|
|
|
|
var_dump(count(get_declared_interfaces()));
|
|
|
|
|
|
|
|
var_dump(get_extension_funcs());
|
|
|
|
var_dump(get_extension_funcs(true));
|
|
|
|
var_dump(gettype(get_extension_funcs("standard")));
|
|
|
|
var_dump(count(get_extension_funcs("standard")));
|
|
|
|
var_dump(gettype(get_extension_funcs("zend")));
|
|
|
|
var_dump(count(get_extension_funcs("zend")));
|
|
|
|
|
|
|
|
|
|
|
|
echo "Done\n";
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2008-06-19 07:38:37 +08:00
|
|
|
Warning: get_resource_type() expects exactly 1 parameter, 0 given in %s on line %d
|
2006-11-21 19:11:39 +08:00
|
|
|
NULL
|
|
|
|
|
2008-06-19 07:38:37 +08:00
|
|
|
Warning: get_resource_type() expects parameter 1 to be resource, string given in %s on line %d
|
|
|
|
NULL
|
2006-11-21 19:11:39 +08:00
|
|
|
string(6) "stream"
|
|
|
|
string(7) "Unknown"
|
|
|
|
string(5) "array"
|
|
|
|
int(%d)
|
2007-08-03 00:54:44 +08:00
|
|
|
string(5) "array"
|
2007-08-08 14:42:10 +08:00
|
|
|
int(%d)
|
2007-08-03 00:54:44 +08:00
|
|
|
|
2007-08-03 06:28:06 +08:00
|
|
|
Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
|
2007-08-03 00:54:44 +08:00
|
|
|
NULL
|
2006-11-21 19:11:39 +08:00
|
|
|
|
2009-05-07 20:08:09 +08:00
|
|
|
Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d
|
2006-11-21 19:11:39 +08:00
|
|
|
NULL
|
|
|
|
string(5) "array"
|
|
|
|
string(5) "array"
|
|
|
|
int(%d)
|
|
|
|
|
2008-03-11 06:17:59 +08:00
|
|
|
Warning: get_defined_functions() expects exactly 0 parameters, 1 given in %s on line %d
|
2006-11-21 19:11:39 +08:00
|
|
|
NULL
|
|
|
|
string(5) "array"
|
|
|
|
int(%d)
|
|
|
|
|
2008-03-11 06:17:59 +08:00
|
|
|
Warning: get_declared_interfaces() expects exactly 0 parameters, 1 given in %s on line %d
|
2006-11-21 19:11:39 +08:00
|
|
|
NULL
|
|
|
|
string(5) "array"
|
|
|
|
int(%d)
|
|
|
|
|
2008-06-19 07:38:37 +08:00
|
|
|
Warning: get_extension_funcs() expects exactly 1 parameter, 0 given in %s on line %d
|
2006-11-21 19:11:39 +08:00
|
|
|
NULL
|
|
|
|
bool(false)
|
|
|
|
string(5) "array"
|
|
|
|
int(%d)
|
|
|
|
string(5) "array"
|
|
|
|
int(%d)
|
|
|
|
Done
|