]> granicus.if.org Git - php/commitdiff
(is_resource, is_bool) new functions
authorThies C. Arntzen <thies@php.net>
Fri, 15 Oct 1999 18:15:02 +0000 (18:15 +0000)
committerThies C. Arntzen <thies@php.net>
Fri, 15 Oct 1999 18:15:02 +0000 (18:15 +0000)
@- Added is_resource(), is_bool() functions. (Thies)

ext/standard/basic_functions.c
ext/standard/basic_functions.h

index 54bc36e7f8c715e48834fa24ebb7698f2e26925b..978512bd8b728cf63f739f96e5b6e68c3876554c 100644 (file)
@@ -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);
index 8591352491047300b6db186aabb1ba0865eab00c..3b266a99e0e759a42adbb294f95dc5cb16680037 100644 (file)
@@ -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);