diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-07-10 03:46:57 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-07-10 03:46:57 +0300 |
commit | 3bb70fe2903acf2caf2600345f07943f34a3b23c (patch) | |
tree | cc8eda7cb3bab8c742bbbd9fafb6f3ce0584fdde /Zend/tests/temporary_cleaning_007.phpt | |
parent | bafe9d8c306659ca0a6897951e5aac428a11fb58 (diff) | |
download | php-git-3bb70fe2903acf2caf2600345f07943f34a3b23c.tar.gz |
Readded tests
Diffstat (limited to 'Zend/tests/temporary_cleaning_007.phpt')
-rw-r--r-- | Zend/tests/temporary_cleaning_007.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Zend/tests/temporary_cleaning_007.phpt b/Zend/tests/temporary_cleaning_007.phpt new file mode 100644 index 0000000000..0e29ed6c33 --- /dev/null +++ b/Zend/tests/temporary_cleaning_007.phpt @@ -0,0 +1,22 @@ +--TEST-- +Exception inside a foreach loop with return +--FILE-- +<?php +class saboteurTestController { + public function isConsistent() { throw new \Exception(); } +} + +$controllers = array(new saboteurTestController(),new saboteurTestController()); +foreach ($controllers as $controller) { + try { + if ($controller->isConsistent()) { + return $controller; + } + } catch (\Exception $e) { + echo "Exception\n"; + } +} +?> +--EXPECT-- +Exception +Exception |