mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
21 lines
262 B
PHP
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
|