Explain this PHP shorthand

Posted by editor on Stack Overflow See other posts from Stack Overflow or by editor
Published on 2010-06-10T20:37:12Z Indexed on 2010/06/10 20:42 UTC
Read the original article Hit count: 103

Filed under:

I feed like a goof but I don't entirely understand what's happening in this code:

$var .= ($one || $two) ? function_one( $one, $another) : function_two( $two, $another);

Does that say if $one or $two then $var is equal to fuction_one(), else function_two()? What's the purpose of using this syntax -- speed?

© Stack Overflow or respective owner

Related posts about php