diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-03-31 13:25:26 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-03-31 13:25:26 +0300 |
commit | e8672deefc9e7fdddff0444b0bfce3e5e20b163e (patch) | |
tree | e096044aa21f1d4f12bdc666a85d71e4c450051f /Zend/tests/add_003.phpt | |
parent | f9d1a47f24f4f702edeed3be372ecf60d3b2b11e (diff) | |
download | php-git-e8672deefc9e7fdddff0444b0bfce3e5e20b163e.tar.gz |
Convert "Unsupported operands" fatal error into EngineException (exceptions can't be thrown at compile-time yet, so unsuported operands in constant expressions are still lead to fatal error).
Diffstat (limited to 'Zend/tests/add_003.phpt')
-rw-r--r-- | Zend/tests/add_003.phpt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/tests/add_003.phpt b/Zend/tests/add_003.phpt index 4223af3f19..f0c9314b2d 100644 --- a/Zend/tests/add_003.phpt +++ b/Zend/tests/add_003.phpt @@ -8,12 +8,22 @@ $a = array(1,2,3); $o = new stdclass; $o->prop = "value"; +try { + var_dump($o + $a); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . "\n"; +} + $c = $o + $a; var_dump($c); echo "Done\n"; ?> --EXPECTF-- +Notice: Object of class stdClass could not be converted to int in %sadd_003.php on line %d + +Exception: Unsupported operand types + Notice: Object of class stdClass could not be converted to int in %s on line %d Fatal error: Unsupported operand types in %s on line %d |