Bug #65645 [Csd->Nab]: interactive shell doesn't support finally block
| From: | rasmus@php.net | Date: | Tue, 10 Sep 2013 10:58:38 +0000 |
| Subject: | Bug #65645 [Csd->Nab]: interactive shell doesn't support finally block | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-181509@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65645&edit=1
ID: 65645
Updated by: rasmus@php.net
Reported by: schavery at gmail dot com
Summary: interactive shell doesn't support finally block
-Status: Closed
+Status: Not a bug
Type: Bug
Package: CGI/CLI related
Operating System: OS X 10.8.4
PHP Version: 5.4.19
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2013-09-09 19:24:27] schavery at gmail dot com
Only works with 5.5+, and I was running 5.4
------------------------------------------------------------------------
[2013-09-09 18:48:42] schavery at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=65645&edit=1