My feeling is that they should all be static consts unless explicitly accessed outside of the object module or changed. Since typically they're a list of function/method entries only accessed by a class or zend_module_entry that is really the case. Without the static we're polluting the name space.
Melanie On 14 Jun 2010, at 11:38, Richard Quadling wrote: > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php