[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[pdt-dev] Ternary operator shortcut
|
Greetings,
I'm new to this list, so please direct me elsewhere if my question isn't appropriate for this forum. I'm wondering about the ternary operator shortcut:
$a = $b ?: $c;
as described here: http://php.net/manual/en/language.operators.comparison.php
Since PHP 5.3, it is possible to leave out the middle part
of the ternary operator. Expression expr1 ?: expr3 returns
expr1 if expr1 evaluates to TRUE, and expr3 otherwise.
When I do this in the PHP editor, I get "syntax error, unexpected :" Is this addressed in Hudson? Is there a workaround for this?
Thanks,
Matt
Matt Leonhardt
Operational Support Systems Engineer
Time Warner Cable - Northeast National Region
Programming & Web Development
Office: (315) 362-3538
Cell: (315) 378-7676
Email: matthew.leonhardt@xxxxxxxxxxx
This E-mail and any of its attachments may contain Time Warner
Cable proprietary information, which is privileged, confidential,
or subject to copyright belonging to Time Warner Cable. This E-mail
is intended solely for the use of the individual or entity to which
it is addressed. If you are not the intended recipient of this
E-mail, you are hereby notified that any dissemination,
distribution, copying, or action taken in relation to the contents
of and attachments to this E-mail is strictly prohibited and may be
unlawful. If you have received this E-mail in error, please notify
the sender immediately and permanently delete the original and any
copy of this E-mail and any printout.