Instantly share code, notes, and snippets.

Embed
What would you like to do?
PHP Magic Methods Program (1)
<?php
class Dog {
public $name;
public function bark() {
echo "Bark! <br />";
}
}
$dog = new Dog();
$dog->name = "Aung Net";
$dog->color = "Black";
$dog->bark();
$dog->eat();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment