php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #45882 echo '<pre>'.var_dump($this->db); prints only array :)
Submitted: 2008-08-21 16:16 UTC Modified: 2008-08-21 17:23 UTC
From: shock at spamavert dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.3.0alpha1 OS: Windows / nix
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: shock at spamavert dot com
New email:
PHP Version: OS:

 

 [2008-08-21 16:16 UTC] shock at spamavert dot com
Description:
------------
When i try to use this contruct:

<?php
  echo '<pre>'.var_dump($db);
?>

then its doing same that:
<?php
  var_dump($db);
?>

but 
<?php
  echo '<pre>';var_dump($db);
?>

Work fine :)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-21 17:23 UTC] tularis@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

Please see the documentation of var_dump, without the second parameter it will automatically send the dump to the output buffer, return *nothing*, append *nothing* to '<pre>' and THEN output that.

All expected behaviour.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 05:01:33 2025 UTC