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

From: Date: Mon, 26 Jun 2000 14:43:37 +0000
Subject: cvs: php4 /ext/standard basic_functions.c info.c info.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-475@lists.php.net to get a copy of this message
kk Mon Jun 26 07:43:37 2000 EDT Modified files: /php4/ext/standard basic_functions.c info.c info.h Log: Added function php_sapi_name() as written by Stefan Livieratos. Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.222 php4/ext/standard/basic_functions.c:1.223 --- php4/ext/standard/basic_functions.c:1.222 Sat Jun 24 11:46:17 2000 +++ php4/ext/standard/basic_functions.c Mon Jun 26 07:43:36 2000 @@ -122,6 +122,7 @@ PHP_FE(phpcredits, NULL) PHP_FE(php_logo_guid, NULL) PHP_FE(zend_logo_guid, NULL) + PHP_FE(php_sapi_name, NULL) PHP_FE(strnatcmp, NULL) PHP_FE(strnatcasecmp, NULL) Index: php4/ext/standard/info.c diff -u php4/ext/standard/info.c:1.101 php4/ext/standard/info.c:1.102 --- php4/ext/standard/info.c:1.101 Sat Jun 17 00:08:53 2000 +++ php4/ext/standard/info.c Mon Jun 26 07:43:37 2000 @@ -638,6 +638,18 @@ RETURN_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1); } +/* {{{ proto string sapi_module_name(void) + Return the current SAPI module name */ +PHP_FUNCTION(php_sapi_name) +{ + if(sapi_module.name) + RETURN_STRING(sapi_module.name,1); + else + RETURN_FALSE; +} + +/* }}} */ + /* * Local variables: * tab-width: 4 Index: php4/ext/standard/info.h diff -u php4/ext/standard/info.h:1.12 php4/ext/standard/info.h:1.13 --- php4/ext/standard/info.h:1.12 Wed Apr 19 16:17:02 2000 +++ php4/ext/standard/info.h Mon Jun 26 07:43:37 2000 @@ -27,7 +27,7 @@ | Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: info.h,v 1.12 2000/04/19 23:17:02 cmv Exp $ */ +/* $Id: info.h,v 1.13 2000/06/26 14:43:37 kk Exp $ */ #ifndef _INFO_H #define _INFO_H @@ -63,6 +63,7 @@ PHP_FUNCTION(phpcredits); PHP_FUNCTION(php_logo_guid); PHP_FUNCTION(zend_logo_guid); +PHP_FUNCTION(php_sapi_name); PHPAPI void php_print_info(int flag); PHPAPI void php_print_credits(int flag); PHPAPI void php_print_style(void);

« previous php.cvs (#475) next »