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

The difference between three string delimiters in PHP

黄舟
Release: 2023-03-03 14:28:02
Original
2351 people have browsed it

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)!

Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template