PHP (1)--Basic syntax

Source: Internet
Author: User
First, the language tag

1. Standard delimiter: form;

Such as:

echo "HelloWorld";

?>

2, paragraph label delimiter: form;

Using this form requires that the Short_open_tag in the php.ini file be set to ON, and the Apache server will be restarted after it takes effect.

3. Script label delimiter: form;

4, ASP style delimiter: <%%> form;

Using this form requires that the asp_tags in the php.ini file be set to ON and the Apache server is also restarted.

Note: The official recommendation uses the standard delimiter form, because the other ways can cause errors, such as the second way may lead to parsing the XML file exception, the third easy to lead to the front page of the script (such as JS script) confusion, ASP style is the same year for the ASP to seize the market and a form of support.

Second, basic grammar

The statement ends with a semicolon ";";

Comment Method:

Way,/* */Mode and # method, originating from C, C + +, and Unix shell language annotation methods.

Identifiers: Can only consist of letters, numbers, and underscores, and can only start with letters or underscores.

The above introduces PHP (1)-the basic syntax, including the aspects of the content, I hope to be interested in PHP tutorial friends helpful.

  • 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.