Home >Backend Development >PHP Tutorial >The difference between three string delimiters in PHP

The difference between three string delimiters in PHP

黄舟
黄舟Original
2016-12-16 13:27:522361browse

The difference between single quotes, double quotes, <<< is as follows:

Single quotes: Variables contained in single quotes will not be parsed, but will be output as is.

                                                                                            $book                                                     $book                      

                                                                                                                          $book =            Contains defined variables, PHP will also parse them.

  Start with <<< plus any name you like, such as <<

                                                                                                                                                                                                                                                                                               .

 HEREDOC;

?>

Based on the above, it can be seen that the execution efficiency of single quotes is higher than the latter two. Therefore, it should be considered appropriately during use.

type="text/javascript">AjaxAction("/Ajax.Asp?Action=ShowSpecial&LogID=33&ShowType=1");

The above is the difference between the three string delimiters in PHP. For more related articles, please Follow the PHP Chinese website (www.php.cn)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn