document.write("
class Car { //properties public $price; public $colour; //constructor function __construct($myPrice, $myColour){ $this->price = $myPrice; $this->colour = $myColour; } //methods function getPrice(){ return $this->price; } function getColour(){ return $this->colour; } } //start the build process $myCar = new Car(50000, "Blue"); echo $myPrice = $myCar->getPrice(); echo $myColour = $myCar->getColour();