News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lars Strojny's Blog:
New magic constant in PHP 5.3
February 22, 2008 @ 15:02:00

In this new blog post today, Lars Strojny talks about a new magic constant that will be joining its brothers in the upcoming PHP 5.3 release - __DIR__.

In PHP 5.3 there will be another magic constant __DIR__. [...] To allow this, the internal function php_dirname() has been moved in the Zend Engine and is now called zend_dirname(). Nevertheless an alias still exists.

__DIR__ will join the other constants (like __LINE__ and __FUNCTION__) to help give the currently running script a little introspection for things like its filename, what class it's currently in and now, what directory the file currently lives in.

0 comments voice your opinion now!
dir magic constant directory php5 new


blog comments powered by Disqus

Similar Posts

Jurriaanpersyn.com: Ajax/PHP-powered Sudoku Helper

Adam Trachtenberg's Blog: Dirty Secrets of OSCON 2006

Tony Bibbs' Blog: PHP5 SOAP Still Has Ways to Go

Ben Ramsey's Blog: New Site for Atlanta PHP

Marco Tabini\'s Blog: Security-related bugs are good. No, really!


Community Events

Don't see your event here?
Let us know!


php7 interview podcast library version laravel5 language voicesoftheelephpant example list framework release introduction unittest community opinion laravel video series api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework