Bug #65645 [NEW]: interactive shell doesn't support finally block
| From: | schavery at gmail dot com | Date: | Mon, 09 Sep 2013 18:48:42 +0000 |
| Subject: | Bug #65645 [NEW]: interactive shell doesn't support finally block | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-181495@lists.php.net to get a copy of this message | ||
From: schavery at gmail dot com
Operating system: OS X 10.8.4
PHP version: 5.4.19
Package: CGI/CLI related
Bug Type: Bug
Bug description:interactive shell doesn't support finally block
Description:
------------
---
From manual page: http://www.php.net/features.commandline.interactive
---
Using php -a
try { echo 'try'; } catch(Exception $e) { echo 'catch'; } finally { echo
'finally'; }
returns:
PHP Parse error: parse error in php shell code on line 1
and:
php > try {
php { echo '1';
php { } catch(Exception $e) {
php { echo '2';
php { } finally { <-- line 5
php { echo '3';
php { }
PHP Parse error: parse error in php shell code on line 5
Test script:
---------------
<?php
try {
echo '1';
} catch (Exception $e) {
echo '2';
} finally {
echo '3';
}
Expected result:
----------------
expected result is:
13
Actual result:
--------------
PHP Parse error
--
Edit bug report at https://bugs.php.net/bug.php?id=65645&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65645&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65645&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65645&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65645&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65645&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65645&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65645&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65645&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65645&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65645&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65645&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65645&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65645&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65645&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65645&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65645&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65645&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65645&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65645&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65645&r=mysqlcfg