Created
July 24, 2017 14:17
-
-
Save elgamine-dev/b08922414e653e2148aedc4697494dfc to your computer and use it in GitHub Desktop.
POO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Test { | |
private $name = 'plop'; | |
private $title = "eee"; | |
public function __construct() { | |
$this->date = date('c'); | |
echo $this->name; | |
} | |
public function __destruct() { | |
} | |
public function main() { | |
} | |
} | |
class Fork extends Test { | |
private static $foo = 'bar'; | |
public function main(){ | |
parent::main(); | |
echo $this->name; | |
} | |
public static function stuff($a, $b) { | |
return self::$foo; | |
} | |
} | |
echo PHP_EOL; | |
echo Fork::stuff(1,2); | |
echo PHP_EOL; | |
echo PHP_EOL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment