xref: /PHP-8.1/Zend/tests/mul_001.phpt (revision cdaf3503)
1--TEST--
2multiplying arrays
3--FILE--
4<?php
5
6$a = array(1,2,3);
7$b = array(1);
8
9try {
10    var_dump($a * $b);
11} catch (Error $e) {
12    echo "\nException: " . $e->getMessage() . "\n";
13}
14
15$c = $a * $b;
16var_dump($c);
17
18echo "Done\n";
19?>
20--EXPECTF--
21Exception: Unsupported operand types: array * array
22
23Fatal error: Uncaught TypeError: Unsupported operand types: array * array in %s:%d
24Stack trace:
25#0 {main}
26  thrown in %s on line %d
27