diff options
author | Sterling Hughes <sterling@php.net> | 2000-11-29 15:37:38 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2000-11-29 15:37:38 +0000 |
commit | 2cc8e2f8c79b4ca00c2e4ef953c12ea1ef6588d4 (patch) | |
tree | 840925327ef00dbaeb405ebd83a5e0bb7cd0fab2 | |
parent | 93b2587876533a356d00f88cb209a29302269882 (diff) | |
download | php-git-2cc8e2f8c79b4ca00c2e4ef953c12ea1ef6588d4.tar.gz |
@ Added the is_null() function that will return true if a variable is of
@ type null. (Sterling)
-rw-r--r-- | ext/standard/basic_functions.c | 9 | ||||
-rw-r--r-- | ext/standard/basic_functions.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index ca00d8abed..dbb6e7cb54 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -309,6 +309,7 @@ function_entry basic_functions[] = { PHP_FE(get_magic_quotes_gpc, NULL) PHP_FE(get_magic_quotes_runtime, NULL) + PHP_FE(is_null, first_arg_allow_ref) PHP_FE(is_resource, first_arg_allow_ref) PHP_FE(is_bool, first_arg_allow_ref) PHP_FE(is_long, first_arg_allow_ref) @@ -1306,6 +1307,14 @@ void php_is_type(INTERNAL_FUNCTION_PARAMETERS,int type) } } +/* {{{ proto bool is_null(mixed var) + Returns true if variable is null */ +PHP_FUNCTION(is_null) +{ + php_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_NULL); +} +/* }}} */ + /* {{{ proto bool is_resource(mixed var) Returns true if variable is a resource */ PHP_FUNCTION(is_resource) diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index b164ec1ec1..07c9cdc49c 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -67,6 +67,7 @@ PHP_FUNCTION(get_magic_quotes_runtime); PHP_FUNCTION(get_magic_quotes_gpc); void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type); +PHP_FUNCTION(is_null); PHP_FUNCTION(is_resource); PHP_FUNCTION(is_bool); PHP_FUNCTION(is_long); |