Bug #70116 [Opn]: debug_zval_dump print int as "long"

From: Date: Thu, 23 Jul 2015 21:27:31 +0000
Subject: Bug #70116 [Opn]: debug_zval_dump print int as "long"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194658@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70116&edit=1

 ID:                 70116
 Updated by:         ab@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:

There's no long usage anymore, it's abstracted to int64_t or int32_t which can be
whatever, fe long long. That has no relation to the internal happening anymore. But int (and/or
bigint later) sounds consistent with the user land.

Thanks.


Previous Comments:
------------------------------------------------------------------------
[2015-07-23 11:04:36] bwoebi@php.net

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.

------------------------------------------------------------------------
[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)

« previous php.bugs (#194658) next »