Skip to content

Instantly share code, notes, and snippets.

Created Feb 15, 2014
What would you like to do?
class User {
public $name = 'user';
public $age = 20;
class Admin extends User {
public $name = 'admin';
$user = new User();
$user->age = 30;
echo $user->name;
echo $user->age;
$admin = new Admin();
echo $admin->name;
echo $admin->age;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment