diff options
author | Thies C. Arntzen <thies@php.net> | 1999-10-15 18:15:02 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 1999-10-15 18:15:02 +0000 |
commit | ac997bb6c2621deb3110d0ed6fbebebe1a60fe5f (patch) | |
tree | b5d31a94a87a434ef61cb834ccac4a2a41c13f0b | |
parent | d3a39771c1320bfc030423db394a5a06a434614c (diff) | |
download | php-git-ac997bb6c2621deb3110d0ed6fbebebe1a60fe5f.tar.gz |
(is_resource, is_bool) new functions
@- Added is_resource(), is_bool() functions. (Thies)
-rw-r--r-- | ext/standard/basic_functions.c | 12 | ||||
-rw-r--r-- | ext/standard/basic_functions.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 54bc36e7f8..978512bd8b 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -278,6 +278,8 @@ function_entry basic_functions[] = { PHP_FE(get_magic_quotes_gpc, NULL) PHP_FE(get_magic_quotes_runtime, NULL) + PHP_FE(is_resource, first_arg_allow_ref) + PHP_FE(is_bool, first_arg_allow_ref) PHP_FE(is_long, first_arg_allow_ref) PHP_FALIAS(is_int, is_long, first_arg_allow_ref) PHP_FALIAS(is_integer, is_long, first_arg_allow_ref) @@ -1525,6 +1527,16 @@ void php3_is_type(INTERNAL_FUNCTION_PARAMETERS,int type) } +PHP_FUNCTION(is_resource) +{ + php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_RESOURCE); +} + +PHP_FUNCTION(is_bool) +{ + php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_BOOL); +} + PHP_FUNCTION(is_long) { php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_LONG); diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 8591352491..3b266a99e0 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -86,6 +86,8 @@ PHP_FUNCTION(get_magic_quotes_runtime); PHP_FUNCTION(get_magic_quotes_gpc); void php3_is_type(INTERNAL_FUNCTION_PARAMETERS, int type); +PHP_FUNCTION(is_resource); +PHP_FUNCTION(is_bool); PHP_FUNCTION(is_long); PHP_FUNCTION(is_double); PHP_FUNCTION(is_string); |