php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #15328 A C-like comma operator would be useful
Submitted: 2002-02-01 13:42 UTC Modified: 2002-02-01 14:49 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: hek at loudoun-net dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.1.1 OS: N/A
Private report: No CVE-ID: None
 [2002-02-01 13:42 UTC] hek at loudoun-net dot com
A C-like comma operator would be useful, to string together series of statements.

Example:

echo (    $precondition
          ? ( doThisAndDiscardReturnValue(), andDoThisAndReturnReturnValue() )
          : doSomethingElseAndReturnReturnValue() );

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-01 14:49 UTC] derick@php.net
not likely to be implemented... bogussing.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri May 20 17:03:35 2022 UTC