Page MenuHomeWickedGov Phorge

MixedKeyedUnkeyedArrayStandard.xml
No OneTemporary

Size
862 B
Referenced Files
None
Subscribers
None

MixedKeyedUnkeyedArrayStandard.xml

<?xml version="1.0"?>
<documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
title="Mixed Keyed Unkeyed Array"
>
<standard>
<![CDATA[
All items in an array should either have an explicit key assigned or none. A mix of keyed and unkeyed items is not allowed.
]]>
</standard>
<code_comparison>
<code title="Valid: Arrays with all items either keyed or unkeyed.">
<![CDATA[
$args = array(
<em>'foo'</em> => 22,
<em>'bar'</em> => 25,
);
$args = array(22, 25);
]]>
</code>
<code title="Invalid: Array with a mix of keyed and unkeyed items.">
<![CDATA[
$args = array(
'foo' => 22,
25,
);
]]>
</code>
</code_comparison>
</documentation>

File Metadata

Mime Type
text/xml
Expires
Mon, Nov 23, 05:16 (3 d, 16 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f8/6b/91bc89ff238b54e606563d430730
Default Alt Text
MixedKeyedUnkeyedArrayStandard.xml (862 B)

Event Timeline