ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#44934 [Opn]: The parser doesn't parse a comma
by tony2001 other posts by this author
May 7 2008 8:47AM messages near this date
#44934 [Fbk->Opn]: The parser doesn't parse a comma | #44934 [Fbk]: The parser doesn't parse a comma
ID:               44934
 Updated by:       tony2001@[...].net
 Reported By:      php at hristov dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: All
 PHP Version:      5.3CVS-2008-05-07 (CVS)
 New Comment:

Oh, please no need to add THAT kind of unreadable syntax, we have
enough of it already.
This one is really ugly and more important - useless.


Previous Comments:
------------------------------------------------------------------------

[2008-05-07 15:27:54] php at hristov dot com

Give you "2" as result.
This is just an example, to simplify what is wanted, not something you
will find somewhere.

------------------------------------------------------------------------

[2008-05-07 15:07:50] jani@[...].net

Other than cause a parse error of course..

------------------------------------------------------------------------

[2008-05-07 15:06:55] jani@[...].net

What exactly is supposed to happen with that php code above? 
I mean, whatta hell is $b = ($a, 1); supposed to do?

------------------------------------------------------------------------

[2008-05-07 14:55:23] andrey@[...].net

To make it even easier for testing :
./php -r '$a=1; $b = ($a, 2);'

The equivalent in C is:
#include <stdio.h> 
int main(void)
{
  int a = 1, c;
  c = (a, 2);
  printf("%d\n", c);
}

"," has lower prio than =, thus the brackets.

------------------------------------------------------------------------

[2008-05-07 14:47:42] andrey@[...].net

If introduced while not completely?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/44934

-- 
Edit this bug report at http://bugs.php.net/?id=44934&edit=1
Thread:
Php At Hristov Dot Com
Php At Hristov Dot Com
tony2001
jani
jani
andrey
andrey
colder

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved