Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7428241
DirnameStandard.xml
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DirnameStandard.xml
View Options
<?xml version="1.0"?>
<documentation
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
title=
"Function Calls to Dirname"
>
<standard>
<![CDATA[
PHP >= 5.3: Usage of dirname(__FILE__) can be replaced with __DIR__.
]]>
</standard>
<code_comparison>
<code
title=
"Valid: Using __DIR__."
>
<![CDATA[
$
path = <em>__DIR__</em>;
]]>
</code>
<code
title=
"Invalid: dirname(__FILE__)."
>
<![CDATA[
$
path = <em>dirname(__FILE__)</em>;
]]>
</code>
</code_comparison>
<standard>
<![CDATA[
PHP >= 7.0: Nested calls to dirname() can be replaced by using dirname() with the
$
levels parameter.
]]>
</standard>
<code_comparison>
<code
title=
"Valid: Using dirname() with the
$
levels parameter."
>
<![CDATA[
$
path = <em>dirname(
$
fi
le, 3)</em>;
]]>
</code>
<code
title=
"Invalid: Nested function calls to dirname()."
>
<![CDATA[
$
path = <em>dirname(dirname(dirname(
$
fi
le)))</em>;
]]>
</code>
</code_comparison>
</documentation>
File Metadata
Details
Attached
Mime Type
text/xml
Expires
Sun, Nov 22, 09:22 (1 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f4/be/d1ddd7d44a79000b4fea148ec7fd
Default Alt Text
DirnameStandard.xml (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment