...
Tip |
---|
|
Code Block |
---|
language | php |
---|
title | my_class.php |
---|
linenumbers | true |
---|
| <?php
class MyClass {
}
?> |
|
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 (i.e. only objects and arrays may be defined using type hints).
Warning |
---|
|
Code Block |
---|
| public function CalcDistance($time, $velocity) {
return $time*$velocity;
} |
|
Tip |
---|
|
Code Block |
---|
| public function calcDistance($time, $velocity) {
return $time*$velocity;
} |
|
There are three types of comments that may be used in PHP. They are block comments (/* */), inline comments (//), and shell comments (#).
...