<?php
    /*
        @Author: Hannan_Mondul
        php()
        2014
    */

    //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>",
        $this->name,$this->band,$this->spreed
        );

        }  

    } // end class here

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

        $bmw->output()


?>
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.