php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60358 Output of var_dump() has changed
Submitted: 2011-11-22 09:41 UTC Modified: 2011-11-22 13:53 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: mapi at pdepend dot org Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.4.0RC1 OS: Ubuntu 11.10
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: mapi at pdepend dot org
New email:
PHP Version: OS:

 

 [2011-11-22 09:41 UTC] mapi at pdepend dot org
Description:
------------
Maybe it's not a bug, but a behavior change. With all PHP versions prior to 5.4.0 
the output of var_dump() for a simple string was enclosed by double quotes. With 
5.4.0 this has changed and the string is now enclosed by single quotes, except 
the string already contains a single quote

Test script:
---------------
php -r 'var_dump("Manuel");'

Expected result:
----------------
string(6) "Manuel"

Actual result:
--------------
string(6) 'Manuel'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-22 11:04 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2011-11-22 11:04 UTC] laruence@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

I can not reproduce this with 5.4-trunk.
 [2011-11-22 11:21 UTC] derick@php.net
It's likely that this is Xdebug. Could you confirm?
 [2011-11-22 13:21 UTC] mapi at pdepend dot org
This output change only appears when xdebug is enabled.
 [2011-11-22 13:21 UTC] mapi at pdepend dot org
-Status: Feedback +Status: Closed
 [2011-11-22 13:22 UTC] mapi at pdepend dot org
@laruence
Sorry may fault. As @derick said, this is an xdebug related issue. When I disable 
the xdebug extension the output of PHP 5.3 and PHP 5.4 is equal.
 [2011-11-22 13:53 UTC] felipe@php.net
-Status: Closed +Status: Bogus
 [2011-11-22 13:53 UTC] felipe@php.net
.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC