Edit report at http://bugs.php.net/bug.php?id=54347&edit=1

 ID:                 54347
 Comment by:         neuhauser+bugs dot php dot net at sigpipe dot cz
 Reported by:        laruence at yahoo dot com dot cn
 Summary:            reflection_extension does not lowercase module
                     function name
 Status:             Open
 Type:               Bug
 Package:            Reflection related
 Operating System:   any
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

i'm wrapping a third-party C library that exposes functions named with
camel case.  i need to keep the function names.  this bug makes the
implementation more verbose, and the names returned from
ReflectionExtension are harder to read.



this bug (or limitation) should be pointed out in
http://www.php.net/manual/en/internals2.funcs.php


Previous Comments:
------------------------------------------------------------------------
[2011-03-22 16:01:31] cataphr...@php.net

This should still probably be fixed, but the functions should be
declared with lowercase names. If you search for PHP_FE in lxr.php.net,
you'll notice this is always the case.



In any case, since zend_register_functions does a lowercasing of the
function names in the module list, the reflection ext should do it too.
But for forward compatibility (in the future we may want to reduce the
points where names are lowercased), it would be best if the extension
follows the convention.

------------------------------------------------------------------------
[2011-03-22 13:36:18] laruence at yahoo dot com dot cn

Description:
------------
in 

static void _extension_string(string *str, zend_module_entry *module,
char *indent TSRMLS_DC)

in php_reflection.c



when reflect extension functions , the codes:

 

        while (func->fname) {

            if (zend_hash_find(EG(function_table), func->fname,
strlen(func->fname) + 1, (void**) &fptr) == FAILURE) {

       

            }



when func->fname is not lowercase cause a PHP warning:



Warning: Internal error: Cannot find extension function
qrcode_encodeString in global function table in Unknown on line 0

Test script:
---------------
no

Expected result:
----------------
no

Actual result:
--------------
no


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54347&edit=1

Reply via email to