php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26775 var_dump only dump public vars from classes
Submitted: 2004-01-03 07:43 UTC Modified: 2004-01-03 08:32 UTC
From: bestmischmaker at web dot de Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5CVS-2004-01-03 (dev) OS: Windows 2000
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: bestmischmaker at web dot de
New email:
PHP Version: OS:

 

 [2004-01-03 07:43 UTC] bestmischmaker at web dot de
Description:
------------
Hy @ all

i have a Problem with var_dump()

i have write a class with private and public class vars...

if i make a var_dump of this class to control my dev.....i only get the public vars.....

is that a bug or is that what you want........

Reproduce code:
---------------
class EMAIL
{
public $err_no,$err_msg;
private $smtp = FALSE;
private $use_sockets = FALSE;

function __construct( $type )
{
    $this->smtp = $type;
}
}

$email = new EMAIL( TRUE );
var_dump($email);

Expected result:
----------------
return off all vars !!!!

Actual result:
--------------
only return public vars....

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-03 07:59 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

print_r() should show em all.
 [2004-01-03 08:32 UTC] derick@php.net
Actually, this was not in the docs. I just fixed this.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 12 12:01:27 2024 UTC