<?php
class Car
{
public function test($var = 'Hello kinjal')
{
$this->var = $var;
return $this->var;
}
}
class Bike
{
public static function test($var)
{
$var = '<br>this is static function';
return $var;
}
}
$obj = new Car();
echo $obj->test();
echo Bike::test('this is non static'); //static function called using :: double colon
?>