View Issue Details

IDProjectCategoryView StatusLast Update
0002320XdebugCode Coveragepublic2025-02-19 07:48
ReporterAlexanderU Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformx86_64OSUbuntuOS Version24.04
Product Version3.4.1 
Summary0002320: var_dump does not output 16 characters in Windows-1251
Description

var_dump a string encoded in Windows-1251 in the browser.
If the xdebug extension is enabled, var_dump does not display characters with codes 0xF0...0xFF.
If you disable the xdebug extension, the string is displayed normally.
Script is in test_01.php
Output is in php8-var_dump-xdebug--ubuntu.png

Steps To Reproduce

Open test_01.php in the browser: http://localhost/test_01.php

Additional Information

Tested in Ubuntu 24.04 + PHP8.3 + xdebug 3.2.0 and in Windows 10 + PHP8.4 + xdebug 3.4.1 (also PHP8.2, PHP8.1)
php -v
Ubuntu 24.04
PHP 8.3.6 (cli) (built: Dec 2 2024 12:36:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies
with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans
Windows 10
PHP 8.4.1 (cli) (built: Nov 20 2024 11:13:29) (ZTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Xdebug v3.4.1, Copyright (c) 2002-2025, by Derick Rethans

Tagscyrillic, php8.3, php8.4, var_dump
Attached Files
test_01.php (641 bytes)   
<?php
      $encoding = 'Windows-1251';
      header('Content-Type:text/html;charset='.$encoding);

      $s = 'карта';
      $se = iconv('UTF-8', $encoding, $s);
      echo $se, '<br>';
      var_dump($se);
      echo '<br><br>';

      $s = 'абвгдежзийклмнопрстуфхцчшщъыьэюя';
      $se = iconv('UTF-8', $encoding, $s);
      echo $se, '<br>';
      var_dump($se);
      echo '<br><br>';

      $s = 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ';
      $se = iconv('UTF-8', $encoding, $s);
      echo $se, '<br>';
      var_dump($se);
      echo '<br><br>';

test_01.php (641 bytes)   
Operating SystemUbuntu, Windows
PHP Version8.3.5-8.3.9

Activities

derick

2025-02-19 07:47

administrator   ~0007182

I believe this is a duplicate of #2319 for which I have linked a PR. There should be a link to Artifacts in the Github actions build for that for Windows binaries.

derick

2025-02-19 07:48

administrator   ~0007184

https://github.com/xdebug/xdebug/actions/runs/13402799357#artifacts

Issue History

Date Modified Username Field Change
2025-02-19 01:28 AlexanderU New Issue
2025-02-19 01:28 AlexanderU Tag Attached: cyrillic
2025-02-19 01:28 AlexanderU Tag Attached: php8.3
2025-02-19 01:28 AlexanderU Tag Attached: php8.4
2025-02-19 01:28 AlexanderU Tag Attached: var_dump
2025-02-19 01:28 AlexanderU File Added: test_01.php
2025-02-19 01:28 AlexanderU File Added: php8-var_dump-xdebug--ubuntu.png
2025-02-19 07:47 derick Note Added: 0007182
2025-02-19 07:48 derick Note Added: 0007184