PHP Tutorial : Get line number

As you might know, PHP Server comes with built-in / already defined constants. Today I’ve been discovering a nice one which gets the line number in a file for you. This may be very usefull in a lot of cases, like a custom error system, debugging and not only. That CONSTANT is called simply _LINE_

This will print 3, because it’s line two!

Tagged with: , , , , ,
Posted in Useful PHP

Leave a Reply

Your email address will not be published. Required fields are marked *