Skip to content

Instantly share code, notes, and snippets.

@myanmarlinks
Created July 9, 2017 04:47
Show Gist options
  • Save myanmarlinks/4033d8266dea1e6d998b09f216ed2e2c to your computer and use it in GitHub Desktop.
Save myanmarlinks/4033d8266dea1e6d998b09f216ed2e2c to your computer and use it in GitHub Desktop.
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