Last active
December 18, 2015 09:44
-
-
Save blizzarddreams/9ee9f2345521fb3c53fb to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| namespace Cat; | |
| class Cat | |
| { | |
| private $name; | |
| public function __construct($name) | |
| { | |
| $this->name = $name; | |
| } | |
| public function fight() | |
| { | |
| echo "$this->name learned how to fight!\n"; | |
| } | |
| } | |
| $sudo = new Cat("Sudo"); | |
| $sudo->fight(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment