Mantis - Quercus
Viewing Issue Advanced Details
3403 crash always 03-20-09 14:13 03-20-09 18:13
chrislewis  
nam  
normal  
closed 3.2.1  
fixed  
none    
none 4.0.0  
0003403: crash with com.caucho.quercus.parser.QuercusParseException on certain integers
Certain number literals cause the parser to crash.

<?php

$i = '078051120'; //ok
$i = (int)'078051120'; //ok
$i = 078051120; //crash!

?>

/src/main/webapp/crash.php:7: expected ';' at integer (8051120) in
crash.php:6: $i = (int)'078051120';
crash.php:7: $i = 078051120;
crash.php:8: echo $i;

Notice that in the exception it has interpreted 078051120 as 8051120.
002281852, 042103580, 062360749 cause the same behavior

Notes
(0003913)
nam   
03-20-09 18:13   
php/0122

Fixed.

'$i = 078051120' is an octal integer and PHP will ignore any invalid octal digits.