2007-04-28 11:59:08 +00:00
|
|
|
--TEST--
|
|
|
|
adding numbers to arrays
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$a = array(1,2,3);
|
|
|
|
|
2015-03-31 10:25:26 +00:00
|
|
|
try {
|
|
|
|
var_dump($a + 5);
|
2015-05-17 22:31:43 +00:00
|
|
|
} catch (Error $e) {
|
2015-03-31 10:25:26 +00:00
|
|
|
echo "\nException: " . $e->getMessage() . "\n";
|
|
|
|
}
|
|
|
|
|
2007-04-28 11:59:08 +00:00
|
|
|
$c = $a + 5;
|
|
|
|
var_dump($c);
|
|
|
|
|
|
|
|
echo "Done\n";
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2015-03-31 10:25:26 +00:00
|
|
|
Exception: Unsupported operand types
|
|
|
|
|
2015-05-17 22:31:43 +00:00
|
|
|
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
|
2015-05-15 19:04:07 +00:00
|
|
|
Stack trace:
|
|
|
|
#0 {main}
|
|
|
|
thrown in %s on line %d
|