php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #12381 Data Structure Dumper Feature Needed
Submitted: 2001-07-25 18:30 UTC Modified: 2001-07-26 14:29 UTC
From: cdaveb at csua dot berkeley dot edu Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.0.6 OS: Linux
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: cdaveb at csua dot berkeley dot edu
New email:
PHP Version: OS:

 

 [2001-07-25 18:30 UTC] cdaveb at csua dot berkeley dot edu
I'd like to suggest that a built in function for dumping PHP data structures (arrays, variables, etc.) into a string which could then be exported to a file be created. This would work something like the Perl Data::Dumper module.  This would be extremely useful for creation of persistent datastructures, especially helpful for programs which include web interfaces to edit settings which are used by another portion of the program.

I find myself writing simple code to do this a lot, but it is something that gets pretty  messy whenever I'm trying to recreate multidimensional arrays and such so that they can later be required into a PHP page.  I'm sure that a function of this type would be useful to a lot of PHP users and I hope you'll consider adding it.

I've looked at a lot of the code repository sites by the way, and I haven't found anything that seems to resemble what I'm looking for already available, but I think it's the type of thing that should really be a part of the base PHP.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-26 14:27 UTC] andy@php.net
have you tried something like the serialize and unserialize
functions?

http://php.net/manual/en/function.serialize.php
http://php.net/manual/en/function.unserialize.php
 [2001-07-26 14:29 UTC] andy@php.net
i meant to make this bogus...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 11:01:30 2024 UTC