Skip to content

Instantly share code, notes, and snippets.

View jahidHn's full-sized avatar

Jahid Hasan jahidHn

View GitHub Profile
@hasinhayder
hasinhayder / singleton.php
Last active May 15, 2019 07:12
singleton
<?php
class Car{
private $numberPlate;
function __construct(){
$this->numberPlate = "G ".mt_rand(1,1000);
}
function honk(){
echo "Pip Pip. The Numberplate is {$this->numberPlate} \n";
}