How to use magic variable __line__ in php

藏色散人
Release: 2023-04-07 07:14:01
Original
4325 people have browsed it

How to use magic variable __line__ in php

How to use the magic variable __line__ in php

__LINE__ is the line that displays the statement in the file number, which can facilitate debugging and accurate positioning.

How to use the magic variable __line__ in php

First create a php file named line.

How to use magic variable __line__ in php

Output a statement "This is the second line in the file" on the second line in the file

How to use magic variable __line__ in php

Add the magic variable line to line 3 of the file and output a statement.

How to use magic variable __line__ in php

Output another statement on the 4th line of the file "This is the 4th line in the file
";

How to use magic variable __line__ in php

Output another statement on line 5 of the file "This is the ".__line__." line in the file
";

How to use magic variable __line__ in php

##In Running the file in the browser displays the line number where the magic variable is located.

How to use magic variable __line__ in php

Note

Magic variable line is case-insensitive

Recommended: [

PHP Tutorial

The above is the detailed content of How to use magic variable __line__ in php. 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