Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17216 программистов и 1838 роботов. Сейчас ищут 1537 программистов ...
Split function definitions onto several lines
Вернуться к: Coding standard enhancements
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
) {
//....
?>
Вернуться к: Coding standard enhancements