cvs: php4 /ext/standard basic_functions.c basic_functions.h

From: Date: Wed, 29 Nov 2000 15:37:38 +0000
Subject: cvs: php4 /ext/standard basic_functions.c basic_functions.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2820@lists.php.net to get a copy of this message
sterling Wed Nov 29 07:37:38 2000 EDT Modified files: /php4/ext/standard basic_functions.c basic_functions.h Log: @ Added the is_null() function that will return true if a variable is of @ type null. (Sterling) Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.279 php4/ext/standard/basic_functions.c:1.280 --- php4/ext/standard/basic_functions.c:1.279 Mon Nov 27 05:31:21 2000 +++ php4/ext/standard/basic_functions.c Wed Nov 29 07:37:38 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.279 2000/11/27 13:31:21 sas Exp $ */ +/* $Id: basic_functions.c,v 1.280 2000/11/29 15:37:38 sterling Exp $ */ #include "php.h" #include "php_main.h" @@ -309,6 +309,7 @@ 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) @@ -1305,6 +1306,14 @@ RETURN_FALSE; } } + +/* {{{ 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 */ Index: php4/ext/standard/basic_functions.h diff -u php4/ext/standard/basic_functions.h:1.68 php4/ext/standard/basic_functions.h:1.69 --- php4/ext/standard/basic_functions.h:1.68 Fri Nov 24 13:05:25 2000 +++ php4/ext/standard/basic_functions.h Wed Nov 29 07:37:38 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.h,v 1.68 2000/11/24 21:05:25 sterling Exp $ */ +/* $Id: basic_functions.h,v 1.69 2000/11/29 15:37:38 sterling Exp $ */ #ifndef BASIC_FUNCTIONS_H #define BASIC_FUNCTIONS_H @@ -67,6 +67,7 @@ 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);

« previous php.cvs (#2820) next »