## 1、PHP tags

When PHP parses a file, it look for opening and closing tags, which are <?phpand ?> which tell PHP to start and stop interpreting the code between them.
if a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file. This prevents accidental whitespace or new lines being added after the PHP closing tag, which may cause unwanted effects because PHP will start output buffering when there is no intention from the programmer to send any output at that point in the script.

## 2、Escaping from HTML

Everything outside of a pair of opening and closing tags is ignored by the PHP parser which allows PHP files to have mixed content. This allows PHP to be embedded in HTML documents.
But there is one exception that in the middle of a conditional statement in which case the interpreter will determine the outcome of the confitional before making a decision of what to skip over. See the next example. Using structures with conditions.

In this example PHP will ship the blocks where the condition is not met, even though they are outside of the PHP open/close tags;
For outputting large blocks of text, dropping out of PHP parsing mode is generally more effcient than sending all of text through echo or print.

Starting with PHP 5.4, short echo tag <?= is always recongnized and vaild, regardless of the short_open_tag setting.

PHP support ‘C’,’C++’ and Unix shell-style(Perl style) comments. For example:

##4、type
PHP supports eight primitive types(原始数据类型):

Four scalar types(标量类型):

• boolean
• integer
• float(aka(又称作) double)
• string

Three compound types:

• array
• object
• callable

And finally two special types

• resource
• NULL

This manual also introduces some pseudo-types(伪类型) for readability reasons：

• mixed
• number
• callback
• array|object
• void

And the pseudo-variable $… The type of the variable is not usually set by programmer; rather(确切的说), it is decided at runtime by PHP depending on the context in which that variable is used. Note: To check the type and variable of the expression, use the var_dump() function. To get a human-readable representation of a type for debugging, use the gettype() function. To check for a certain type, do not use gettype(), but rather the is_type functions. Some examples: To forcibly(强制地) convert a variable to a certain type, either cast(eg: (bool)$a_str) or use the settype() function on it.
Note that a variable may be evaluated(被评估) with diffrent values in certain situations, depending on what type it is at the time.