Bug #70116 [Opn]: debug_zval_dump print int as "long"
Edit report at https://bugs.php.net/bug.php?id=70116&edit=1
ID: 70116
Updated by: bwoebi@php.net
Reported by: laruence@php.net
Summary: debug_zval_dump print int as "long"
Status: Open
Type: Bug
Package: *General Issues
PHP Version: 7.0.0beta1
Block user comment: N
Private report: N
New Comment:
I'm not sure. debug_zval_dump() should show whether it is a long or a bigint, whenever we
introduce them⦠Such internal differences is exactly what this function is good for.
Previous Comments:
------------------------------------------------------------------------
[2015-07-23 03:27:04] yohgaki@php.net
+1 for consistency.
"int" is preferred because PHP shouldn't care size of integer. One day, we may have
arbitrarily size of integer.
------------------------------------------------------------------------
[2015-07-23 03:08:26] laruence@php.net
Description:
------------
for:
<?php
debug_zval_dump(1);
var_dump(1);
?>
debug_zval_dump prints long(1),
bug var_dump prints int(1)
maybe they should print the same for consistent?
Test script:
---------------
<?php
debug_zval_dump(1);
var_dump(1);
?>
Expected result:
----------------
long(1)
long(1)
or
int(1)
int(1)
Actual result:
--------------
long(1)
int(1)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70116&edit=1
Thread (5 messages)