Skip to content

Instantly share code, notes, and snippets.

@JacobHsu
Created August 18, 2014 07:59
Show Gist options
  • Save JacobHsu/0745bfce13ac0421490e to your computer and use it in GitHub Desktop.
Save JacobHsu/0745bfce13ac0421490e to your computer and use it in GitHub Desktop.
#PHP :How to access class methods and properties
<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