Mantis - Quercus
Viewing Issue Advanced Details
3392 block always 03-16-09 10:28 03-18-09 15:35
koreth  
nam  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003392: Quercus doesn't decode hex integer strings
<?php
$x = 5000;
$y = '0x5000';
print $x < $y ? "yep" : "nope";

PHP prints "yep". Quercus prints "nope".
 patch.txt [^] (4,946 bytes) 03-16-09 11:27
 patchv2.txt [^] (4,800 bytes) 03-16-09 13:47

Notes
(0003880)
koreth   
03-16-09 11:27   
Patch attached. Not sure if that's how you'd want to do it but it fixes the problem for me.
(0003881)
koreth   
03-16-09 12:04   
Patch doesn't seem quite adequate; it fixes the test case but there seem to be at least one additional case involving strings that get turned into ConstStringValue that I haven't been able to distill to a simple test yet.
(0003882)
koreth   
03-16-09 13:48   
Updated patch attached; it was just a bug in the code I added.
(0003897)
nam   
03-18-09 15:35   
php/035r