Question: class Vehicle { private $type; public function _ _ construct ( $type ) { $this - > type = $type; } public function get _

class Vehicle {
private $type;
public function __construct($type){
$this->type = $type;
}
public function get_type(){
return $this->type;
}
}/*06: Create a new Vehicle instance named myTruck
from the Vehicle class you created in #01. Pass in the
value "gasoline" to the constructor. Output the
result of using json_encode on $myTruck */
$myTruck = new Vehicle("gasoline"); echo json_encode($myTruck)."/n";what is wrong?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!