View Issue Details

IDProjectCategoryView StatusLast Update
0000744XdebugUncategorizedpublic2012-02-29 13:13
Reporteraarjan Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
OSLinuxOS VersionCentOS 5.3 
Product Version2.1.0 
Summary0000744: new lines in a PHP file from Windows are displayed with an extra white line with var_dump();
Description

The next PHP code shows an empty line in the browser. This is because Windows stores a "Return" as a \r\l (0000013#10) and xdebug seems to replace only the \l

<?php
$my_test_string = 'hello
world';

var_dump($my_test_string);
?>

Hexdump -C output:
00000000 3c 3f 70 68 70 0d 0a 0d 0a 24 6d 79 5f 74 65 73 |<?php....$my_tes|
00000010 74 5f 73 74 72 69 6e 67 20 3d 20 27 68 65 6c 6c |t_string = 'hell|
00000020 6f 0d 0a 09 09 09 09 09 77 6f 72 6c 64 27 3b 0d |o.......world';.|
00000030 0a 09 09 09 09 09 0d 0a 76 61 72 5f 64 75 6d 70 |........var_dump|
00000040 28 24 6d 79 5f 74 65 73 74 5f 73 74 72 69 6e 67 |($my_test_string|
00000050 29 3b 0d 0a 0d 0a 3f 3e |);....?>|
00000058

Html output (note that the "&0000010" is on a new line):
<pre class='xdebug-var-dump' dir='ltr'><small>string</small> <font color='#cc0000'>'hello
world'</font> (length=17)

Steps To Reproduce

See attached file

Additional Information

Saving the file in Unix-style (only \l) shows the proper output

TagsNo tags attached.
Attached Files
xdebug_test.php (88 bytes)
Operating System
PHP Version5.3.8

Activities

derick

2012-02-29 13:13

administrator   ~0001935

Fixed on github for 2.1.4 and 2.2.0.

Issue History

Date Modified Username Field Change
2011-11-02 10:22 aarjan New Issue
2011-11-02 10:22 aarjan File Added: xdebug_test.php
2012-02-29 13:13 derick Note Added: 0001935
2012-02-29 13:13 derick Status new => closed
2012-02-29 13:13 derick Assigned To => derick
2012-02-29 13:13 derick Resolution open => fixed
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized