php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50730 suggest changing which is does by default--ambiguous
Submitted: 2010-01-12 15:43 UTC Modified: 2010-01-13 09:28 UTC
From: dave at deltatns dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: wamp
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dave at deltatns dot com
New email:
PHP Version: OS:

 

 [2010-01-12 15:43 UTC] dave at deltatns dot com
Description:
------------
in the print_r section called Parameters:

I would suggest changing 

"If this parameter is set to TRUE, print_r() will return its output, instead of printing it (which it does by default). "  

to "...its output ( return=false, the default setting will print it)"

or some other phrase to remove the ambiguity of what the default might be.

I am slower than most people.  It took me 15 seconds or so to not read the above with the meaning true will print it.   very low priority and maybe  not worth doing...just FYI of my read of it.

The manual is a really valuable resource,which I use constantly. I am very grateful to all who have contributed and worked on it.  Thanks   Dave 

Reproduce code:
---------------
---
From manual page: function.print-r#Parameters
---



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-12 16:31 UTC] rquadling@php.net
The default is clearly identified in the description.

mixed print_r ( mixed $expression [, bool $return = false ] )


 [2010-01-12 17:29 UTC] dave at deltatns dot com
I do not agree, as I indicated already that I noticed that, however, it is easily changed to make it clear at the place where I indicated.  


I did not take the time to enter this because I thought it was bogus, so I take exception to that status.  

Takes more time to discuss this than to change it... so I am done.  I made a valid suggestion... if you do not want to act on it, that is your choice.  


Good luck, if you always treat suggestions this way.  I will certainly avoid making any more.  Those of us who are not experts are your best source for suggestions of this type. 

I am still grateful for this documentation.. Thanks for that.   Dave
 [2010-01-13 09:20 UTC] svn@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=293493
Log: Clarify use of return parameter. Fixes #50730
 [2010-01-13 09:28 UTC] salathe@php.net
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.

That section was a bit clunky, and the "return" section forgot to mention the return types at all.  New wording is: "When this parameter is set true, print_r will return the information rather than print it." and in the return section, "When the return parameter is true, this function will return a string. Otherwise, the return value is true."  I hope that you approve of the changes.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 03:00:02 2026 UTC