Skip to content

Instantly share code, notes, and snippets.

View hadaytullah's full-sized avatar

Hadaytullah hadaytullah

View GitHub Profile
@hadaytullah
hadaytullah / oop.php
Last active October 25, 2019 09:17
Object oriented programming example in php
<? php
class User {
private $name;
private $lastLoggedInAt;
private $loggedIn;
function __construct($name) {
$this->name = $name;
$this->loggedIn = false;
@hadaytullah
hadaytullah / morse.php
Last active October 25, 2019 09:17
Morse code algorithm in PHP
<? php
class MorseNode {
private $value;
private $leftNode;
private $rightNode;
function __construct($value, $leftNode, $rightNode){
$this->value = $value;
$this->leftNode = $leftNode;
$this->rightNode = $rightNode;