Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip
titleCorrect
Code Block
languagephp
linenumberstrue
<?php
class MyClass {
    public $foo;
    private $bar = "baz";

    public function __construct() {
    }
}
?>

 

Methods

Method names should begin with a lowercase letter and be camelCased. Type hinting should be used whenever possible, but must conform to PHP 5.1 syntax (i.e. only objects and arrays may be defined using type hints).

...

Tip
titleCorrect
Code Block
languagephp
/**
 * This is a doc block comment 
 */ 
function foo() {

}

...

Inline Comments

Inline comments should be used to clarify code. You are discouraged from using inline comments at the end of a line as this creates run-on lines and your comment is unlikely to be read.

...