Please enable JavaScript.
Coggle requires JavaScript to display documents.
PHP OOP (MEMEBERS (public, private, protected (can only be accessed within…
PHP OOP
class
class className{};
-
class ClassName{ public $sample function __construct($param){ $this->sample = $param; } function view(){ echo $this->sample; } }
object
creating an object, we create an object with the new keyword
-
-
-
MEMEBERS
public
we can access it from the inside the class, outside the class, and from the within another class;
private
can only be accessed within the class, and not from another class that inherits its class;
-
-