PHP: Difference between revisions
(→OO) |
(→OO) |
||
| Line 10: | Line 10: | ||
** protected: only in derived classes | ** protected: only in derived classes | ||
** public: everywhere | ** public: everywhere | ||
* ctor | |||
function __construct() { | |||
parent::__construct() // has to be called explicitly | |||
... | |||
} | |||
Revision as of 09:45, 16 August 2018
OO
- namespace?
- interface?
- self?
- $this?
- use?
- annotations?
- visibility:
- private: only in this class
- protected: only in derived classes
- public: everywhere
- ctor
function __construct() {
parent::__construct() // has to be called explicitly
...
}