Comma operator?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Comma operator?

Post by Weirdan »

Does anyone know if there is comma operator in PHP? I had seen it in the manual (in the operator's precedence table) but failed to get it to work.

For those who don't know what comma operator is:
Comma operator is used in C/C++/some other languages to evaluate several expressions but return result of the last one only.
User avatar
Kriek
Forum Contributor
Posts: 238
Joined: Wed May 29, 2002 3:46 am
Location: Florida
Contact:

Post by Kriek »

To the best of my knowledge, no, PHP does not.
derick@php.net wrote:not likely to be implemented
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Yeah, I read it. (Google loves me ;)). Just hope the php devs will change their minds....
Post Reply