ID: 40980 Updated by: [EMAIL PROTECTED] Reported By: php at htmlland dot net -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: N/A PHP Version: Irrelevant -Assigned To: +Assigned To: ezyang New Comment:
This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Thanks for the patch Edward Previous Comments: ------------------------------------------------------------------------ [2007-04-23 13:22:15] tayloj1 at uk dot ibm dot com Ref: bool print_r ( mixed $expression [, bool $return] ) Agree that the return on print_r() should be "mixed" not "bool" as print_r either returns a bool or a string: If $return is not specified or set to false then print_r returns a bool of TRUE if command is successful - or - a bool of FALSE on error If $return == TRUE then print_r either returns a string if command completes OK - or - a bool FALSE on errors Correct syntax is: mixed print_r ( mixed $expression [, bool $return] ) Although "mixed" is not very descriptive, this usage is consistent with the rest of the documentation. ------------------------------------------------------------------------ [2007-04-08 19:42:47] [EMAIL PROTECTED] "Mixed" is not terribly descriptive though. Maybe... Index: en/reference/var/functions/print-r.xml =================================================================== RCS file: /repository/phpdoc/en/reference/var/functions/print-r.xml,v retrieving revision 1.12 diff -u -r1.12 print-r.xml --- en/reference/var/functions/print-r.xml 7 Mar 2006 01:12:15 -0000 1.12 +++ en/reference/var/functions/print-r.xml 8 Apr 2007 19:42:19 -0000 @@ -11,7 +11,7 @@ <refsect1> <title>Description</title> <methodsynopsis> - <type>bool</type><methodname>print_r</methodname> + <type>bool/string</type><methodname>print_r</methodname> <methodparam><type>mixed</type><parameter>expression</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>return</parameter></methodparam> </methodsynopsis> I don't know if we allow that. ------------------------------------------------------------------------ [2007-04-05 09:55:13] [EMAIL PROTECTED] The return parameter was added in PHP4.3.0 and this does change the return type. As this is the current way print_r() operates, then I agree with you that it should and that the old behaviour should be recorded. ------------------------------------------------------------------------ [2007-04-02 18:29:15] php at htmlland dot net Description: ------------ Shoulden't the return on print_r() be mixed not bool as shown on the documentation page? I say this because the return parameter changes the output returned to a string not a bool. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40980&edit=1