|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-08-19 13:45 UTC] 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
Patchesbug-49294 (last revision 2010-05-28 02:31 UTC by kalle@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 09:00:01 2025 UTC |
Just FYI, my patch only contains the local value, not the master value. But in the end we can always alter the info() method to return a multi dim. array like: php.ini: apc.cache_by_default = 0; Test script: ini_set('apc.cache_by_default', '1'); $extension = new ReflectionExtension('apc'); $info = $extension->info(); printf('[local=%s] [master=%s]', $info['ini']['apc.cache_by_default']['local'], $info['ini']['apc.cache_by_default']['master']); Would print: [local=1] [master=0]