xref: /PHP-7.4/Zend/tests/mod_001.phpt (revision e8f992c1)
1--TEST--
2modulus by zero
3--FILE--
4<?php
5
6$a = array(1,2,3);
7$b = array();
8
9try {
10    $c = $a % $b;
11    var_dump($c);
12} catch (DivisionByZeroError $e) {
13	echo "Exception: " . $e->getMessage() . "\n";
14}
15
16echo "Done\n";
17?>
18--EXPECT--
19Exception: Modulo by zero
20Done
21