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.
Output a statement "This is the second line in the file" on the second line in the file
Add the magic variable line to line 3 of the file and output a statement.
Output another statement on the 4th line of the file "This is the 4th line in the file
";
Output another statement on line 5 of the file "This is the ".__line__." line in the file
";
Note
Magic variable line is case-insensitiveRecommended: [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!