Bug #54347 [Opn->Csd]: reflection_extension does not lowercase module function name
Edit report at http://bugs.php.net/bug.php?id=54347&edit=1
ID: 54347
Updated by: felipe@php.net
Reported by: laruence at yahoo dot com dot cn
Summary: reflection_extension does not lowercase module
function name
-Status: Open
+Status: Closed
Type: Bug
Package: Reflection related
Operating System: any
PHP Version: Irrelevant
-Assigned To:
+Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2011-06-10 00:45:38] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=311990
Log: - Fixed bug #54347 (reflection_extension does not lowercase module function name)
patch by: laruence at yahoo dot com dot cn
------------------------------------------------------------------------
[2011-05-25 14:13:46] neuhauser+bugs dot php dot net at sigpipe dot cz
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
------------------------------------------------------------------------
[2011-03-22 16:01:31] cataphract@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
Thread (4 messages)