php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #5714 print_r() or/and var_dump() into a string
Submitted: 2000-07-21 00:24 UTC Modified: 2000-08-18 11:01 UTC
From: Dante at altmuehlnet dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.0 OS: Linux / Win98 / Win2000
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: Dante at altmuehlnet dot de
New email:
PHP Version: OS:

 

 [2000-07-21 00:24 UTC] Dante at altmuehlnet dot de
print_r() and var_dump() are very usefull for debugging!

I have an extra class for errors, for logging and so on...
I would be very usefull when print_r() and/or var_dump() could return a string containig the informaition, cause normally will be directly printed to screen, and I can't bring that into an log-file.
I can read out the information by self (while...each($object)), but if print_r() and/or var_dump() directly could do this it would be more better.

Bye & Thanks
  Dante

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-29 16:46 UTC] stas@php.net
You probably better use output buffering. There's no real need to make all functions in 2 versions - output and string, if you have output buffering that can do it.
 [2000-08-18 11:01 UTC] waldschrott@php.net
right, thus closed
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 03:00:02 2026 UTC