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