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
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: 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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 10:02:33 2024 UTC