In PHP, create a class called “Person” that has two variablesfirst_name and last_name and a function called fullName(). Whenthis function is called, it will return the first name concatenatedwith the last name variables of the object.
This is how we will use the person class (the following codeshould work with your code):
$omar = new Person();
$omar->first_name = “Omar”;
$omar->last_name = “Mohammad”;
print($omar->fullName());
The output for the previous code will be: “Omar Mohammad”.
Expert Answer
An answer will be send to you shortly. . . . .