Different ways to collect an extension's functions.

From: Date: Mon, 14 Jun 2010 10:38:51 +0000
Subject: Different ways to collect an extension's functions.
Groups: php.internals 
Request: Send a blank email to internals+get-48768@lists.php.net to get a copy of this message
Hi. I'm looking into bug#52079 (missing lcfirst function from function index). The cause of the bug is that the genfunclist / genfuncindex scripts haven't been run in a while. Whilst running them and fixing a small issue with ereg => preg, I notice that in the results of genfunclist, there are 3 different ways to collect an extensions functions ... 1) The majority use const (79 in total). # const zend_function_entry apache_functions[] = { # const zend_function_entry apache_functions[] = { # const zend_function_entry basic_functions[] = { # const zend_function_entry bcmath_functions[] = { # const zend_function_entry birdstep_functions[] = { ... # const zend_function_entry xsl_functions[] = { # const zend_function_entry zend_funcs_aggregate[] = { # const zend_function_entry zend_funcs_arrayaccess[] = { # const zend_function_entry zend_funcs_iterator[] = { # const zend_function_entry zend_funcs_serializable[] = { 2) The following use static. # static zend_function_entry disabled_function[] = { # static zend_function_entry mysqlnd_functions[] = { # static zend_function_entry php_sqlite3_class_methods[] = { # static zend_function_entry php_sqlite3_result_class_methods[] = { # static zend_function_entry php_sqlite3_stmt_class_methods[] = { # static zend_function_entry spl_funcs_SplFixedArray[] = { 3) The following don't use const or static. # zend_function_entry enchant_functions[] = { # zend_function_entry fileinfo_functions[] = { # zend_function_entry intl_functions[] = { # zend_function_entry litespeed_functions[] = { # zend_function_entry phar_exception_methods[] = { # zend_function_entry phar_functions[] = { # zend_function_entry php_archive_methods[] = { # zend_function_entry php_entry_methods[] = { # zend_function_entry php_oci_functions[] = { Regards, Richard. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling

« previous php.internals (#48768) next »