Home > Backend Development > PHP Tutorial > PHP, php tutorial_PHP tutorial

PHP, php tutorial_PHP tutorial

WBOY
Release: 2016-07-13 09:52:09
Original
1089 people have browsed it

PHP, php tutorial

PHP supports 3 styles of comments

1.C style (//) comments

This kind of comment cannot appear in the ?> tag. If the short_open and asp_tag settings are turned on, > and %> also cannot appear in the comment

<?<span>php
    </span><span>echo</span> 'Hello,PHP!';     <span>//</span><span>我是注释,不被执行    </span>
?>
Copy after login

2.C language style, nested comments are not allowed

<?<span>php
    </span><span>/*</span><span>
    *我是注释,不被执行
    </span><span>*/</span>
    <span>echo</span> &lsquo;Hello,PHP!<span>&rsquo;;
</span>?>
Copy after login

3.Shell style, same as C ban

<?<span>php
    </span><span>echo</span> 'Hello,PHP!';   <span>#</span><span>我是注释,不被执行</span>
?>
Copy after login

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1010339.htmlTechArticlePHP, php tutorial PHP supports 3 styles of comments 1. C style (//) comments such comments The ? tag cannot appear. If the short_open and asp_tag settings are turned on, the same as % cannot appear in the comment...
Related labels:
php
source:php.cn
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