Skip to content

Instantly share code, notes, and snippets.

@EricMcWinNer
Last active July 26, 2021 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EricMcWinNer/eb581609018b68f7b23382375066842b to your computer and use it in GitHub Desktop.
Save EricMcWinNer/eb581609018b68f7b23382375066842b to your computer and use it in GitHub Desktop.
<?php
class Animal {
public static function makeSound(){
echo "Animal";
}
public static function vocalize() {
echo self::makeSound();
}
}
class Dog extends Animal {
public static function makeSound() {
echo "Dog";
}
}
Dog::vocalize(); // This echoes "Animal". Shocker right?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment