PHP

From Wiki RB4
Revision as of 09:52, 16 August 2018 by UweHeuer (talk | contribs) (→‎OO)

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
  ...
}
  • dtor
function __destruct() {
  parent::__destruct(); // has to be called explicitly
}