php if true return value or false shorthand code example Example: php ternary $result = $condition ? 'foo' : 'bar';