@Author: Hannan_Mondul

    //use construct 

    class Car {
        public $name;
        public $band;
        public $spreed;

        public function __construct($name="Unkown",$band="Unkwon",$spreed=40){

            $this->name = $name;
            $this->band = $band;
            $this->spreed = $spreed;


        function output (){

        printf("<p> This car name is %s and its band is %s and its spreed is %d per hour</p>",


    } // end class here

    $bmw = new Car('Vison','BMW',100);


Member Avatar for diafol

What is this for?

I believe he is attempting to demonstrate.

Member Avatar for diafol

Perhaps if we ignore him, he'll go away. This user has a history of posting random code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.