2007-04-28 19:59:08 +08:00
|
|
|
--TEST--
|
|
|
|
multiplying arrays
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$a = array(1,2,3);
|
|
|
|
$b = array(1);
|
|
|
|
|
2015-03-31 18:25:26 +08:00
|
|
|
try {
|
2020-02-04 05:52:20 +08:00
|
|
|
var_dump($a * $b);
|
2015-05-18 06:31:43 +08:00
|
|
|
} catch (Error $e) {
|
2020-02-04 05:52:20 +08:00
|
|
|
echo "\nException: " . $e->getMessage() . "\n";
|
2015-03-31 18:25:26 +08:00
|
|
|
}
|
|
|
|
|
2007-04-28 19:59:08 +08:00
|
|
|
$c = $a * $b;
|
|
|
|
var_dump($c);
|
|
|
|
|
|
|
|
echo "Done\n";
|
|
|
|
?>
|
2018-09-17 01:16:42 +08:00
|
|
|
--EXPECTF--
|
2020-04-01 16:05:26 +08:00
|
|
|
Exception: Unsupported operand types: array * array
|
2015-03-31 18:25:26 +08:00
|
|
|
|
2020-04-01 16:05:26 +08:00
|
|
|
Fatal error: Uncaught TypeError: Unsupported operand types: array * array in %s:%d
|
2015-05-16 03:04:07 +08:00
|
|
|
Stack trace:
|
|
|
|
#0 {main}
|
|
|
|
thrown in %s on line %d
|