PHP·98 questions

How to create a class?

Answer
class ClassName { }.
Properties: public $name;.
Methods: public function method() { }.
Constructor: __construct().
Creating an instance: $obj = new ClassName().
Was this answer helpful?

More questions in this topic

Related questions from other topics