#27496 [Opn->Bgs]: 'some_function() or throw' doesn't work
| From: | derick@php.net | Date: | Thu, 04 Mar 2004 16:45:20 +0000 |
| Subject: | #27496 [Opn->Bgs]: 'some_function() or throw' doesn't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-55915@lists.php.net to get a copy of this message | ||
ID: 27496
Updated by: derick@php.net
Reported By: sergio at alsernet dot es
-Status: Open
+Status: Bogus
Bug Type: Zend Engine 2 problem
Operating System: Linux 2.6.3
PHP Version: 5.0.0b4 (beta4)
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
.
Previous Comments:
------------------------------------------------------------------------
[2004-03-04 11:42:19] sergio at alsernet dot es
Description:
------------
This code generates a 'parse error':
try {
@some_function() or throw new
Exception("Error"); //parse error in this line
}catch (Exception $e) {
...
}
But this code works ok:
try {
@some_function() or die("I should throw a exception
here");
}catch (Exception $e) {
...
}
some_function(), of course returns a boolean value. I'm
running this code from a CLI.
Reproduce code:
---------------
try {
@some_function() or throw new Exception("Error"); //parse error in
this line
}catch (Exception $e) {
...
}
Expected result:
----------------
Something instead a 'Parse Error'
Actual result:
--------------
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27496&edit=1