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

diafol

What is this for?

I believe he is attempting to demonstrate.

Member Avatar

diafol

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