cvs: /php4/ext/standard basic_functions.c

From: Date: Thu, 29 Jul 1999 03:48:29 +0000
Subject: cvs: /php4/ext/standard basic_functions.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-2937@lists.php.net to get a copy of this message
andi Wed Jul 28 23:48:29 1999 EDT Modified files: /php4/ext/standard basic_functions.c Log: - Added function documentation prototypes. Thanks to Egon Schmid for straightening me out :) Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.61 php4/ext/standard/basic_functions.c:1.62 --- php4/ext/standard/basic_functions.c:1.61 Wed Jul 28 13:58:37 1999 +++ php4/ext/standard/basic_functions.c Wed Jul 28 23:48:29 1999 @@ -1622,6 +1622,9 @@ php3_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_OBJECT); } +/* {{{ proto string get_class(object object) + Retrieves the class name ... +*/ PHP_FUNCTION(get_class) { pval *arg; @@ -1634,7 +1637,11 @@ } RETURN_STRINGL(arg->value.obj.ce->name, arg->value.obj.ce->name_length, 1); } +/* }}} */ +/* {{{ proto string get_parent_class(object object) + Retrieves the parent class name ... +*/ PHP_FUNCTION(get_parent_class) { pval *arg; @@ -1647,7 +1654,11 @@ } RETURN_STRINGL(arg->value.obj.ce->parent->name, arg->value.obj.ce->parent->name_length, 1); } +/* }}} */ +/* {{{ proto bool method_exists(object object, string method) + Checks if the class method exists ... +*/ PHP_FUNCTION(method_exists) { pval *arg1, *arg2; @@ -1659,8 +1670,13 @@ RETURN_FALSE; } convert_to_string(arg2); - RETURN_LONG(zend_hash_exists(&arg1->value.obj.ce->function_table, arg2->value.str.val, arg2->value.str.len+1)); + if(zend_hash_exists(&arg1->value.obj.ce->function_table, arg2->value.str.val, arg2->value.str.len+1) { + RETURN_TRUE; + } else { + RETURN_FALSE; + } } +/* }}} */ PHP_FUNCTION(leak) { @@ -2242,7 +2258,7 @@ } } -/* {{{ proto int function_exists(string function_name) +/* {{{ proto bool function_exists(string function_name) Checks if a given function has been defined */ PHP_FUNCTION(function_exists) {

« previous php.version4 (#2937) next »