Friday, January 12, 2007

Which way to get the PHP self script name is the fastest?

From the blog today, there's some benchmarking results from Mgcci's look at PHP's methods for grabbing some common data the script's own name. This includes the magic call to __FILE__: The result shows that __FILE__ is the fastest, so use that when you don't have to use any other method to find the script's self. __FILE__ is a built in constant show the location of the running script.


No comments: