Created
August 18, 2014 07:59
-
-
Save JacobHsu/0745bfce13ac0421490e to your computer and use it in GitHub Desktop.
#PHP :How to access class methods and properties
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
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<p> | |
<?php | |
class Person{ | |
public static function say(){ | |
echo "Here are my thoughts!"; | |
} | |
} | |
class Blogger extends Person { | |
const cats = 50; | |
} | |
Blogger::say(); | |
echo Blogger::cats; | |
?> | |
</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment