Edit report at http://bugs.php.net/bug.php?id=51757&edit=1
ID: 51757 User updated by: sstrat...@php.net Reported by: sstrat...@php.net -Summary: Division By Zero in Soap Service Returns 0 +Summary: Division By Zero triggers Warning instead of Fatal Error Status: Open Type: Bug Package: Math related Operating System: Linux PHP Version: 5.3.2 New Comment: Changed title to reflect scope of the bug. Previous Comments: ------------------------------------------------------------------------ [2010-05-06 16:14:09] sstrat...@php.net Description: ------------ In PHP 5.3 (and probably 5.2x as well) a division by Zero returns null and squelches a warning. The issue becomes when the return is cast to Int as is done via soap service which is where I discovered this issue. Test script: --------------- <?PHP $val = 5/0; echo (int)$val; Expected result: ---------------- Fatal Error: Division by zero in /var/www/reproduction/test.php on line 3 Actual result: -------------- Warning: Division by zero in /var/www/reproduction/test.php on line 3 int(0) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51757&edit=1