PHP Classes

File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml

Recommend this page to a friend!
  Classes of Simo  >  CodeIgniter Plugin for Z-Ray  >  zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml  >  Download  
File: zray/vendor/PHP_CodeSniffer-2.2.0/CodeSniffer/Standards/PEAR/Docs/Functions/ValidDefaultValueStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CodeIgniter Plugin for Z-Ray
Show CodeIgniter application information in Z-Ray
Author: By
Last change:
Date: 3 months ago
Size: 635 bytes
 

Contents

Class file image Download
<documentation title="Default Values in Function Declarations">
    <standard>
    <![CDATA[
    Arguments with default values go at the end of the argument list.
    ]]>
    </standard>
    <code_comparison>
        <code title="Valid: argument with default value at end of declaration">
        <![CDATA[
function connect($dsn, <em>$persistent = false</em>)
{
    ...
}
        ]]>
        </code>
        <code title="Invalid: argument with default value at start of declaration">
        <![CDATA[
function connect(<em>$persistent = false</em>, $dsn)
{
    ...
}
        ]]>
        </code>
    </code_comparison>
</documentation>
For more information send a message to info at phpclasses dot org.