What does php use to comment single lines of code?

藏色散人
Release: 2023-02-24 07:48:01
Original
4230 people have browsed it

What does php use to comment single lines of code?

What does php use to comment a single line of code?

All text around "//" in a line will be Treated as comments, the PHP parser will ignore the code to the right of the line "//" as follows:

<?php
echo "test"; // 这是单行注释
?>
Copy after login

If the first line only writes comments and no code, the content after "//" will also be ignored. will be displayed. The code is as follows:

<?php
//这是单行注释
echo “test”;
//这是单行注释
?>
Copy after login

Related recommendations: "PHP Tutorial"

The above is the detailed content of What does php use to comment single lines of code?. For more information, please follow other related articles on the PHP Chinese website!

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