]> granicus.if.org Git - php/commitdiff
Moved function_exists() to Zend library.
authorAndrei Zmievski <andrei@php.net>
Tue, 14 Dec 1999 22:15:55 +0000 (22:15 +0000)
committerAndrei Zmievski <andrei@php.net>
Tue, 14 Dec 1999 22:15:55 +0000 (22:15 +0000)
NEWS
ext/standard/basic_functions.c
ext/standard/basic_functions.h

diff --git a/NEWS b/NEWS
index 36e6b2af40111ebcb3de34672b5f0bfdabd15d74..0a36c0a8aa38295b7b9a904901459c7d6cbd21cf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ PHP 4.0                                                                    NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 ?? ?? ????, Version 4.0 Beta 4
+- Added class_exists() function (Andrei, Zend library)
 - Made strspn() and strcspn() binary-safe. (Andrei)
 - Added array_multisort() function. (Andrei)
 - Made pageinfo.c thread-safe (Sascha)
index 0f96155a3fb7dcfbe5280c5c54722d71491d22cb..d92fbac3c50ccbceb0499edd6491937d6719f223 100644 (file)
@@ -304,8 +304,6 @@ function_entry basic_functions[] = {
        PHP_NAMED_FE(header,            PHP_FN(Header),                                                 NULL)
        PHP_FE(headers_sent,                                                    NULL)
        
-       PHP_FE(function_exists,                         NULL)
-
        PHP_FE(connection_aborted,                      NULL)
        PHP_FE(connection_timeout,                      NULL)
        PHP_FE(connection_status,                       NULL)
@@ -1407,35 +1405,6 @@ PHP_FUNCTION(ignore_user_abort)
 }
 /* }}} */
 
-/* {{{ proto bool function_exists(string function_name) 
-   Checks if a given function has been defined */
-PHP_FUNCTION(function_exists)
-{
-       pval **fname;
-       pval *tmp;
-       char *lcname;
-       CLS_FETCH();
-       
-       if (ARG_COUNT(ht)!=1 || getParametersEx(1, &fname)==FAILURE) {
-               WRONG_PARAM_COUNT;
-       }
-       convert_to_string_ex(fname);
-
-       lcname = estrdup((*fname)->value.str.val);
-       zend_str_tolower(lcname, (*fname)->value.str.len);
-       if (zend_hash_find(CG(function_table), lcname,
-                                               (*fname)->value.str.len+1, (void**)&tmp) == FAILURE) {
-               efree(lcname);
-               RETURN_FALSE;
-       } else {
-               efree(lcname);
-               RETURN_TRUE;
-       }
-}
-
-/* }}} */
-
-
 /* {{{ proto int getservbyname(string service, string protocol)
    Returns port associated with service. protocol must be "tcp" or "udp". */
 PHP_FUNCTION(getservbyname)
index 7ffe3371e85dbebb1507007a1f17dc5c1a6774b3..188f9ffc54fc2e84fa8338c61c79ac6963c8a20d 100644 (file)
@@ -98,8 +98,6 @@ PHP_FUNCTION(connection_timeout);
 PHP_FUNCTION(connection_status);
 PHP_FUNCTION(ignore_user_abort);
 
-PHP_FUNCTION(function_exists);
-
 PHP_FUNCTION(getservbyname);
 PHP_FUNCTION(getservbyport);
 PHP_FUNCTION(getprotobyname);