php-src/Zend/tests/mod_001.phpt
2015-07-03 11:18:53 +08:00

21 lines
262 B
PHP

--TEST--
modulus by zero
--FILE--
<?php
$a = array(1,2,3);
$b = array();
try {
$c = $a % $b;
var_dump($c);
} catch (DivisionByZeroError $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
echo "Done\n";
?>
--EXPECT--
Exception: Modulo by zero
Done