2080 10

BIT301 ยท 2080 ยท 5 marks

Write a PHP program to access properties and methods of a class.

Write a PHP program to access properties and methods of a class. [5]

Web Technology IIChapter 6: Object Oriented ProgrammingClass properties and attributes

Concept Syntax Description --------- Define a class class ClassName { } Blueprint for objects Create an object $obj = new ClassName(); Instance of a class Access property $obj-propertyName Using arrow operator - Access method $obj-methodName() Using arrow operator - Access inside class $this-prop...