php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #11798 "svar_dump()" wanted
Submitted: 2001-06-29 05:54 UTC Modified: 2002-04-27 15:35 UTC
From: oyvindmo at initio dot no Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Latest CVS ( OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: oyvindmo at initio dot no
New email:
PHP Version: OS:

 

 [2001-06-29 05:54 UTC] oyvindmo at initio dot no
It would be very nice to have a var_dump() that returns the variable dump as a string instead of printing it.  Using var_dump() for verbose logging is mighty handy, but having to (ab)use output buffering to catch the var dump feels bad.

(I looked briefly at the implementation of var_dump(), and making a "svar_dump()" seemed out of my C league, unfortunately.)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-09 07:33 UTC] sander@php.net
Derick just added a new function called var_export which does exactly what you want. It will be in PHP-4.2.0.
 [2001-12-11 16:19 UTC] derick@php.net
var_export does not do this, it merely has a different format then var_dump, so that it is correct PHP code.

Derick
 [2002-04-27 15:35 UTC] jimw@php.net
use output buffering.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC