php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45867 get_var_dump();
Submitted: 2008-08-20 17:37 UTC Modified: 2010-12-03 17:56 UTC
From: bholbrook at tech-monkeys dot org Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.6 OS: any
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: bholbrook at tech-monkeys dot org
New email:
PHP Version: OS:

 

 [2008-08-20 17:37 UTC] bholbrook at tech-monkeys dot org
Description:
------------
Add function get_var_dump() to relieve the inconveniences associated with var_dump() automatically outputting.

Reproduce code:
---------------
//for expected result
$getDump = get_var_dump($_GET);
mail("to@me.com", "GET dump from domain@domain.com", $getDump);
header("content-type:{$_GET['type']}");

//for actual result
var_dump($_GET);
header("content-type:{$_GET['type']}");

//can be emulated with, but cumbersome, and not always enabled on remote hosts
ob_start();
var_dump($_GET);
$getDump = ob_get_contents();
ob_end_clean();
mail("to@me.com", "GET dump from domain@domain.com", $getDump);
header("content-type:{$_GET['type']}");

Expected result:
----------------
1) No error.
2) Ability to send / manipulate (convert to json for ajax apps) var dump data outside of php

Actual result:
--------------
1) Header fails
2) var_dump must be seen as processed by tester and cannot be collected in a beta environment.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-03 17:56 UTC] jani@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-12-03 17:56 UTC] jani@php.net
There is var_export() already.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 09 00:00:02 2025 UTC