php-src/Zend/tests/div_by_zero_in_static.phpt
Nikita Popov ae77c7b057 Return correct result code for division by zero
Turns out we do need to return FAILURE here on div by zero
exception. Use a three-way return value from div_function_base.

Fixes oss-fuzz #25975.
2020-10-02 12:09:14 +02:00

12 lines
201 B
PHP

--TEST--
Division by zero in static
--FILE--
<?php
static $a = 1/0;
?>
--EXPECTF--
Fatal error: Uncaught DivisionByZeroError: Division by zero in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d