コード例 #1
0
ファイル: good.php プロジェクト: mohc/vdd
}
/**
 * Enter description here ...
 */
function _private_foo()
{
}
// When calling class constructors with no arguments, always include
// parentheses.
$bar = new Bar();
$bar = new Bar($arg1, $arg2);
$bar = 'Bar';
$foo = new $bar();
$foo = new $bar($i, $i);
// Static class variables use camelCase.
Bar::$basePath = '/foo';
// Concatenation - there has to be a space.
$i . "test";
$i . 'test';
$i . $i;
$i . NULL;
// It is allowed to have the closing "}" on the same line if the class is empty.
class MyException extends Exception
{
}
// Nice alignment is allowed for assignments.
class MyExampleLog
{
    const INFO = 0;
    const WARNING = 1;
    const ERROR = 2;