diff options
author | Adam <adam@adambard.com> | 2013-07-03 08:49:38 -0700 |
---|---|---|
committer | Adam <adam@adambard.com> | 2013-07-03 08:49:38 -0700 |
commit | 8ffd02feff7a82eb5db2daf212589ef0f3621523 (patch) | |
tree | 59add0696a99fc7beb34ba7b35de7e51a3b07390 /php.html.markdown | |
parent | aa66a13d49f4e2ccfad3d29e427527c94b191064 (diff) | |
parent | 7599a283676dcbd90557239d03ae5266b62549b1 (diff) |
Merge branch 'master' of https://github.com/adambard/learnxinyminutes-docs
Diffstat (limited to 'php.html.markdown')
-rw-r--r-- | php.html.markdown | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/php.html.markdown b/php.html.markdown index 75bbd214..f0c5c918 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -231,6 +231,9 @@ if (false) { print 'Does'; } +// ternary operator +print (false ? 'Does not get printed' : 'Does'); + $x = 0; if ($x === '0') { print 'Does not print'; @@ -240,6 +243,8 @@ if ($x === '0') { print 'Does print'; } + + // This alternative syntax is useful for templates: ?> |