PHP Learning Notes (i): Basic grammar mark, blank, and annotation _php skills

Source: Internet
Author: User

One, PHP tags

1. XML style

Copy Code code as follows:

<?php echo "Hello World";? >

2. Short style
Copy Code code as follows:

? echo "Hello World";?>

3. Script Style
Copy Code code as follows:

<script language= "php" >echo "Hello World";</script>

Second, PHP comments

1. Single Note://(C + + style)
2, Multiline comments: *//(c style)
3. Single-line script annotation: # (Shell style)

Tips: Notes are generally written above the code

Three, PHP blank

1, Blank Space separator

NewLine (carriage return), Space, tab (tab)

2, the Convention custom

Code fragment (2 lines), Class (2 rows), function (1 rows), function variable with first statement (1 rows), comment before (1 rows)

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.