Mantis - Quercus
Viewing Issue Advanced Details
1133 trivial always 05-19-06 18:09 05-21-06 07:31
koreth  
ferg  
normal  
closed 3.0.20  
fixed  
none    
none 3.0.20  
0001133: Quercus is a 32-bit PHP environment
Quercus emulates PHP on a 32-bit system. This is not a bug, exactly, but it may cause differences in behavior between existing (64-bit) PHP installations and Quercus. For example:

<?php
print crc32(1) . "\n";
?>

Quercus and Zend PHP compiled in 32-bit mode both return -2082672713. But PHP compiled in a 64-bit environment returns 2212294583.

At the very least, Quercus' 32-bit-ism should be documented somewhere. Or, ideally, there should be a config option to choose which mode to run in. (I believe the only difference from the point of view of PHP code is the default size of integers.)

Notes
(0001160)
ferg   
05-20-06 08:38   
Actually, Quercus is 64-bits. All "int" values are 64-bit java longs. It's entirely possible that particular functions are buggy.
(0001163)
ferg   
05-21-06 07:31   
php/110a