Skip to content

Instantly share code, notes, and snippets.

@myanmarlinks
Created July 9, 2017 04:47
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