[wp-trac] [WordPress Trac] #32274: Works faster that use __DIR__ instead of dirname(__FILE__) .

WordPress Trac noreply at wordpress.org
Sat May 28 12:44:39 UTC 2016


#32274: Works faster that use __DIR__ instead of dirname(__FILE__) .
-----------------------------+------------------------------
 Reporter:  kmvan            |       Owner:
     Type:  feature request  |      Status:  reopened
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  performance
-----------------------------+------------------------------
Changes (by nigro.simone):

 * status:  closed => reopened
 * type:  enhancement => feature request
 * resolution:  maybelater =>


Comment:

 dirname(__FILE__) or __DIR__, their result is exactly the same, are
 absolutly equivalent! in this moment, in my wordpress, i have totally
 replace dirname(__FILE__) with __DIR__ and work with no error/issue...
 please prove it.

 Please read:

 http://stackoverflow.com/questions/2749416/is-there-any-difference-
 between-dir-and-dirname-file-in-php

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32274#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list