|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72272 var_dump() incorrect PHP_INT_MAX/MIN info with xdebug.overload_var_dump enabled
Submitted: 2016-05-27 04:27 UTC Modified: 2016-05-30 05:29 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: denixport at gmail dot com Assigned: derick (profile)
Status: Assigned Package: Xdebug (PECL)
PHP Version: 7.0.7 OS: Windows 10 64bit
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-05-27 04:27 UTC] denixport at gmail dot com
var_dump() doesn't show correct info about PHP_INT_MAX and PHP_INT_MIN constants on 64bit Windows

Test script:



Expected result:

Actual result:


main_PHPMAX.patch (last revision 2016-05-27 16:12 UTC) by harsha dot patankar at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-27 16:14 UTC] harsha dot patankar at gmail dot com
It was a missing header issue. Now fixed.
 [2016-05-27 19:27 UTC]
-Status: Open +Status: Feedback
 [2016-05-27 19:27 UTC]
Thanks for the report. Though, I cannot reproduce the behavior you describe? Do you compile with vc14 (lower are not supported for 7.0)? Please note also, that stdint.h shouldn't be included directly, see main/php_stdint.h.

 [2016-05-27 20:27 UTC] denixport at gmail dot com
-Status: Feedback +Status: Open
 [2016-05-27 20:27 UTC] denixport at gmail dot com
I'm using this build: VC14 x64 Non Thread Safe 
see details below

$ php -i
PHP Version => 7.0.7

System => Windows NT DENIX-PC 10.0 build 10586 (Windows 10) AMD64
Build Date => May 25 2016 12:48:10
Compiler => MSVC14 (Visual C++ 2015)
Architecture => x64
Configure Command => cscript /nologo configure.js  "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--with-pdo-oci=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shar
ed" "--with-oci8-12c=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer"
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => C:\WINDOWS
Loaded Configuration File => C:\PHP\php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
PHP API => 20151012
PHP Extension => 20151012
Zend Extension => 320151012
Zend Extension Build => API320151012,NTS,VC14
PHP Extension Build => API20151012,NTS,VC14
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled
 [2016-05-29 15:46 UTC]
-Status: Open +Status: Feedback
 [2016-05-29 15:46 UTC]
Thanks for the info. Is that the same config you use for the custom build? Does it repro with -n?

 [2016-05-29 20:04 UTC] denixport at gmail dot com
-Summary: var_dump() incorrect PHP_INT_MAX/MIN info +Summary: var_dump() incorrect PHP_INT_MAX/MIN info with xdebug.overload_var_dump enabled -Status: Feedback +Status: Open -Package: Unknown/Other Function +Package: Xdebug
 [2016-05-29 20:04 UTC] denixport at gmail dot com
you're correct, -n solves the issue, so it's about configuration

I figured out it's xdebug zend extension and it's default ini setting
xdebug.overload_var_dump = 2
 [2016-05-30 05:29 UTC]
-Assigned To: +Assigned To: derick
 [2016-08-19 13:17 UTC] sendthomasanemail at gmail dot com
It looks like it isn't just incorrect info about the constants.

$large_number = 2147483648;
var_dump($large_number);              // int -2147483648

$large_number = 2147483648;
var_dump($large_number);              // -2147483648

$large_number = 9223372036854775807;
var_dump($large_number);              // int -1

$large_number = 9223372036854775808;
var_dump($large_number);              // float 9.2233720368548E+18
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC