php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #20305 print_r() handling of BOOLs
Submitted: 2002-11-07 18:03 UTC Modified: 2002-11-07 19:10 UTC
From: carlos at wfmh dot org dot pl Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.2.3 OS: Linux GNU/Debian
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: carlos at wfmh dot org dot pl
New email:
PHP Version: OS:

 

 [2002-11-07 18:03 UTC] carlos at wfmh dot org dot pl
Recently print_r() does not fully works as documented "Prints human-readable information about a variable". If there's a BOOL variable, no human readable output appears. I suggest to change this and make print_r() output "(BOOL) TRUE" or "(BOOL) FALSE)" depending on the value of BOOL variable (the "(BOOL)" prefix is to differ these from strings "TRUE/FALSE" (just-in-case ;). Since print_r() is often used for debugging purpose, such fix could simplify it.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-07 19:10 UTC] sniper@php.net
Use var_dump() instead.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 17:01:27 2024 UTC