Bug #49294 [PATCH]: ReflectionExtension::info() returns null
| From: | kalle@php.net | Date: | Fri, 28 May 2010 02:31:13 +0000 |
| Subject: | Bug #49294 [PATCH]: ReflectionExtension::info() returns null | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150897@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=49294&edit=1
ID: 49294
Patch added by: kalle@php.net
Reported by: andreww at uk dot ibm dot com
Summary: ReflectionExtension::info() returns null
Status: Assigned
Type: Bug
Package: Reflection related
Operating System: *
PHP Version: 5.*, 6 (2009-08-20)
Assigned To: johannes
New Comment:
The following patch has been added/updated:
Patch Name: bug-49294
Revision: 1275013869
URL:
http://bugs.php.net/patch-display.php?bug=49294&patch=bug-49294&revision=1275013869
Previous Comments:
------------------------------------------------------------------------
[2009-08-20 10:37:05] jani@php.net
Assigned to Johannes who added this method. Seems quite weird that
there's one single method that just outputs stuff instead of returning
it. Not very consistent.
------------------------------------------------------------------------
[2009-08-20 09:54:59] jani@php.net
There is no such OS as "Any".
------------------------------------------------------------------------
[2009-08-19 13:45:36] andreww at uk dot ibm dot com
Description:
------------
The documentation for the ReflectionExtension class shows info() as
returning a string, but it returns NULL and prints the information
directly to the screen.
I used the Windows installer package from Jun 29 2009 (basic install, no
changes), but was also able to reproduce problem with the 5.3.1-dev snap
from Aug 19 2009
Reproduce code:
---------------
<?php
$ext = new ReflectionExtension('iconv');
$info = $ext->info();
printf("Info:\n%s\n", $info ? $info : 'NULL');
?>
Expected result:
----------------
Info:
iconv support => enabled
iconv implementation => "libiconv"
iconv library version => 1.11
Directive => Local Value => Master Value
iconv.input_encoding => ISO-8859-1 => ISO-8859-1
iconv.output_encoding => ISO-8859-1 => ISO-8859-1
iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
Actual result:
--------------
iconv
iconv support => enabled
iconv implementation => "libiconv"
iconv library version => 1.11
Directive => Local Value => Master Value
iconv.input_encoding => ISO-8859-1 => ISO-8859-1
iconv.output_encoding => ISO-8859-1 => ISO-8859-1
iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
Info:
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=49294&edit=1