The first is a safe open and close tag variation, the second is the so called short-open tag. The second one is not always available, use the first option if it’s possible.
You could check the availability of short open tags in php.ini, at the short_open_tag.
More Related Contents:
- Parse error: syntax error, unexpected ‘;’ [closed]
- What is the difference between single-quoted and double-quoted strings in PHP?
- PHP syntax for dereferencing function result
- What are the PHP operators “?” and “:” called and what do they do?
- What does ‘
- Special characters in property name of object
- Why is PHP printing my number in scientific notation, when I specified it as .000021?
- Difference between if () { } and if () : endif;
- PHP curly brace syntax for member variable
- Initializing PHP class property declarations with simple expressions yields syntax error
- PHP Difference between array() and []
- Difference between period and comma when concatenating with echo versus return?
- Why are functions and methods in PHP case-insensitive?
- Shorthand for arrays: is there a literal syntax like {} or []?
- Double underscore in PHP
- PHP syntax question: What does the question mark and colon mean? [duplicate]
- What does this mean in PHP: -> or => [duplicate]
- What is “:” in PHP? [closed]
- What does the b in front of string literals do?
- PHP syntax for dereferencing function result
- Why PHP variables start with a $ sign symbol?
- How can I add a condition inside a php array?
- What is the difference between ‘ and ” in PHP? [duplicate]
- syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING [duplicate]
- What is the name for the “
- Where can I read about conditionals done with “?” and “:” (colon)? [duplicate]
- What is the use of
- What’s the prefix for binary in PHP?
- default as first option in switch statement?
- Weak typing in PHP: why use isset at all?