previousCoding standard enhancements (Previous) (Next) Split function call on several linesnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Split function definitions onto several lines

Functions with many parameters need to be split onto several lines to keep the 80 chars/line limit. The first parameters may be put onto the same line as the function name if there is enough space. Subsequent parameters on following lines are to be indented 4 spaces. The closing parenthesis and the opening brace are to be put onto the next line, on the same indentation level as the "function" keyword.

<?php

function someFunctionWithAVeryLongName($firstParameter 'something'$secondParameter 'booooo',
    
$third null$fourthParameter false$fifthParameter 123.12,
    
$sixthParam true
) {
    
//....
?>
previousCoding standard enhancements (Previous) (Next) Split function call on several linesnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.