Re: [RFC] Pipe Operator
| From: | Sara Golemon | Date: | Tue, 17 May 2016 17:52:31 +0000 |
| Subject: | Re: [RFC] Pipe Operator | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93385@lists.php.net to get a copy of this message | ||
On Tue, May 17, 2016 at 5:47 AM, Ryan Pallas <derokorian@gmail.com> wrote:
> Can the place holder be used twice?
>
In the current PR version, no. It adds complexity to the
implementation when dealing with temp vars. In the interest of
keeping the implementation simple, I opted for making the repeated use
of $$ an error. If that's a serious problem, I can take another crack
at resolving that short-coming.
> If its numeric, can I make it negative or perform other math?
>
You can do anything with it that you can do with any other expression.
So yeah, unary minus, basic math, concat, etc... If you can use a
variable there, you can use the placeholder.
-Sara