1 2 3 4 5 6 7 8 9
<?php function foo() { return 'hello world'; } $exclamation = ($result = foo()) ? $result : "i'm speechless"; echo $exclamation; ?>
1
hello world