Last active
August 29, 2015 14:22
-
-
Save DoNotLickToaster/39fbc3352140bdc5b528 to your computer and use it in GitHub Desktop.
person w/ 4sci
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 Person { | |
public $name; | |
public function __construct($name) { | |
$this->name = $name; | |
} | |
public function Speak() { | |
echo "Hello, world!"; | |
} | |
} | |
class 4sci extends Person { // He's a creature of his own | |
public function Speak() { | |
echo "jasflasbdfkjads"; // He also speaks garbled shit | |
} | |
} | |
$Man = new Person("Bob"); | |
$Man->Speak(); // normal man speaking | |
$thing = new 4sci("4sci"); | |
$thing->Speak(); // yay garbled shit | |
// just kidding 4sci ur cool | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment