PHP ternary operator throwing parse error on clients site
<p>I just sent out a demo of a plugin that I've been working on to a client. He's installed it and gotten this error:</p>

<pre><code>Parse error: syntax error, unexpected ':' in /home/pianokey/public_html/wp-content/plugins/press-pay/app/controller/email/email.c.php on line 69
</code></pre>

<p>The line in question is":</p>

<pre><code> echo(($shipping_address)?:"");
</code></pre>

<p>As far as I can tell, this should be valid php syntax. I'm using the ternary operator to test $shipping_address, echo it if it evaluates to true or a blank space if not. It works on my testing system but seems like it's not supported by my client's php installation. </p>

<p>Any ideas on what syntax is going to be most widely accepted? I'm kind of a rubyist so I like this syntax because it's similar to the ubiquitous |= conditional assignment operator that you see in a lot of ruby code. But, obviously, usability of the code trumps my personal preference for style.</p>

<p>Thanks!</p>

<p>EDIT: OK, closing this question as "off-topic" is BS. I'm trying to get input from people who use <em>WordPress</em> because I want to see what an installation of <em>WordPress</em> looks like so that I can write a <em>WordPress</em> plugin that just works in the greatest number of <em>WordPress</em> installations possible.</p>
