From: sergio at alsernet dot es
Operating system: Linux 2.6.3
PHP version: 5.0.0b4 (beta4)
PHP Bug Type: Zend Engine 2 problem
Bug description: 'some_function() or throw' doesn't work
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 bug report at http://bugs.php.net/?id=27496&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27496&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27496&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=27496&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=27496&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27496&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=27496&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=27496&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=27496&r=support
Expected behavior: http://bugs.php.net/fix.php?id=27496&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=27496&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=27496&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=27496&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27496&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=27496&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=27496&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=27496&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27496&r=float