Miserable New PHP string

Source: Internet
Author: User
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.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.