From:             admin at saltwaterc dot net
Operating system: Windows x64, irrelevant version
PHP version:      5.2.11
PHP Bug Type:     Scripting Engine problem
Bug description:  Windows x64 build lacks proper suport for 64-bit signed long

Description:
------------
The Windows x64 build of PHP has an issue with the integer data type. It
may have issues with floating point numbers, but I didn't test it. The
integer bugs me since I work with large integers as column primary keys in
databases. I can't check for overflows with is_int() either (obvious).

Runtime:
- 3rd party PHP 5.2.5 x64 build
- 3rd party PHP 5.2.8 x64 build
- my own PHP 5.2.11 x64 builds
- official snapshot PHP 5.3.1RC1 (used below) - so the issue is in both of
the 5.2.x and 5.3.x branches

Compiler
- MSVC++ 8.0 Express
- MSVC++ 9.0 Express

Windows SDK:
- 6.1a
- 7.0

Since there were various versions built with various compilers and
Windwows SDKs, I tend to believe that this is a PHP build system related
issue, rather than an issue with that MSVC++ stuff.

PS: at the moment this x64 issue is a development problem as the code goes
into production on *nix machines with proper 64-bit support. Please don't
tell me the same story from report #49492. Yes, Apache doesn't provide
official x64 builds, but it is supported, thus 64-bit development is
possible. Try it yourself:
http://www.anindya.com/apache-http-server-2-2-14-x86-x64-msi-installers/

Reproduce code:
---------------
<?php // long.php
function assert_handler($file, $line, $code)
{
    echo "Assertion Failed:
        File '$file'
        Line '$line'
        Code '$code'";
}
assert_options(ASSERT_ACTIVE, 1);
assert_options(ASSERT_WARNING, 0);
assert_options(ASSERT_QUIET_EVAL, 1);
assert_options(ASSERT_CALLBACK, 'assert_handler');
assert(is_int(3147483647) === TRUE);

Expected result:
----------------
Nothing!

Actual result:
--------------
C:\Users\Saltwater\Desktop>php-5.3.1RC1-Win32-VC9-x64\php.exe long.php
Assertion Failed:
        File 'C:\Users\Saltwater\Desktop\long.php'
        Line '13'
        Code ''
C:\Users\Saltwater\Desktop>


-- 
Edit bug report at http://bugs.php.net/?id=49974&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49974&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49974&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49974&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49974&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49974&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49974&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49974&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49974&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49974&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49974&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49974&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49974&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49974&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49974&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49974&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49974&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49974&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49974&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49974&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49974&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49974&r=mysqlcfg

Reply via email to