Req #62449 [NEW]: Allow comma separated statements with (brace omitted) if statements
| From: | andrew at phantom dot uk dot net | Date: | Fri, 29 Jun 2012 13:38:27 +0000 |
| Subject: | Req #62449 [NEW]: Allow comma separated statements with (brace omitted) if statements | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-171625@lists.php.net to get a copy of this message | ||
From: andrew at phantom dot uk dot net
Operating system:
PHP version: 5.4.4
Package: *General Issues
Bug Type: Feature/Change Request
Bug description:Allow comma separated statements with (brace omitted) if statements
Description:
------------
Allow statements to be separated by commas in single line if statements
(when
omitting the braces)
Test script:
---------------
if ( isset($_GET['take_me_there']) )
header('location: /you_are_here.php'), exit;
Expected result:
----------------
The client would be redirected to www.yoursite.com/you_are_here.php and the
script would terminate execution.
Actual result:
--------------
Parse error: syntax error, unexpected ',' in /opt/lampp/htdocs/test.php on
line 2
--
Edit bug report at https://bugs.php.net/bug.php?id=62449&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62449&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62449&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62449&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62449&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62449&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62449&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62449&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62449&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62449&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62449&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62449&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62449&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62449&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62449&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62449&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62449&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62449&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62449&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62449&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62449&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62449&r=mysqlcfg