I think it is very useful to introduce the so-called new string in the new string PHP Manual. Otherwise, it will be annoying for a large section of html to escape the single quotation marks, today, I am just using it. as a result, I am sad to find that it is not working. $ Str = & lt; mark & lt; divclass: A new PHP string
The PHP manual introduces the so-called new string. I think it is still very useful. Otherwise, it will be annoying for a large section of html simply to escape the single quotation marks. today I will be able to use it, as a result, we found that it was not working.
$ Str = <It is such a simple section. after The Terminator mark is placed, check that there are no errors in PHPEclipse, but it will not work during runtime. the following error is reported.Parse error: syntax error, unexpected '<' (T_SL) in .....
Google has found that there are still many people who have encountered this problem. The answers are all placed by the Terminator. I am absolutely compliant with the standard. isn't my php version good ?...... After a few minutes, I found my start character "<
< p><>
Therefore, the rules for the new php string are:
1. start symbol, and add the name symbol with three minor signs, for example, "<
< p><>
2. the technical symbol ("EOT;") must be placed in the top frame. In addition, there cannot be spaces after this semicolon !!! Believe me, I tried it. My versions are PHP 5.3.2 and PHP 5.4.4. I have not tried any other versions.