How does PHP contribute to object-oriented programming, and what role do JavaScript and CSS play in this context?

PHP contributes to object-oriented programming by allowing developers to create classes, objects, and methods to organize and structure their code. JavaScript and CSS play a role in this context by providing client-side functionality and styling to enhance the user experience.

<?php

class Car {
    public $color;
    public $brand;

    public function __construct($color, $brand) {
        $this->color = $color;
        $this->brand = $brand;
    }

    public function displayInfo() {
        echo "This is a " . $this->color . " " . $this->brand . " car.";
    }
}

$myCar = new Car("red", "Toyota");
$myCar->displayInfo();

?>