Edit report at https://bugs.php.net/bug.php?id=55378&edit=1

 ID:                 55378
 Updated by:         der...@php.net
 Reported by:        for-bugs at hnw dot jp
 Summary:            binary number literal returns float number though
                     its value is enough small
-Status:             Assigned
+Status:             To be documented
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   MacOSX
 PHP Version:        5.4.0alpha3
 Assigned To:        derick
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in SVN, but binary literals need to be mentioned at 
http://www.php.net/manual/en/language.types.integer.php


Previous Comments:
------------------------------------------------------------------------
[2011-08-07 17:36:28] der...@php.net

Automatic comment from SVN on behalf of derick
Revision: http://svn.php.net/viewvc/?view=revision&revision=314443
Log: - Fixed bug #55378: binary number literal returns float number though its 
value
  is enough small

------------------------------------------------------------------------
[2011-08-07 01:37:02] for-bugs at hnw dot jp

Description:
------------
The binary numbers format(see #50648, https://bugs.php.net/bug.php?id=50648)
was introduced to PHP 5.4.0alpha3.

However, its boundary value is wrong for judging whether return value shoud be 
integer or floating point number. See test script.

Test script:
---------------
<?php
var_dump(0b1111111);
var_dump(0b1111111111111111);


Expected result:
----------------
int(127)
int(65535)

Actual result:
--------------
int(127)
float(65535)


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55378&edit=1

Reply via email to