php-src/Zend/tests/mul_001.phpt

27 lines
428 B
Plaintext
Raw Normal View History

2007-04-28 19:59:08 +08:00
--TEST--
multiplying arrays
--FILE--
<?php
$a = array(1,2,3);
$b = array(1);
try {
2020-02-04 05:52:20 +08:00
var_dump($a * $b);
} catch (Error $e) {
2020-02-04 05:52:20 +08:00
echo "\nException: " . $e->getMessage() . "\n";
}
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--
Exception: Unsupported operand types: array * array
Fatal error: Uncaught TypeError: Unsupported operand types: array * array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d