Skip to content

Instantly share code, notes, and snippets.

@EricMcWinNer
Created July 26, 2021 00:45
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/30fdcfa8e40ae723247074f55933a2f2 to your computer and use it in GitHub Desktop.
Save EricMcWinNer/30fdcfa8e40ae723247074f55933a2f2 to your computer and use it in GitHub Desktop.
<?php
class A {
public static function staticMethod() {
echo "I am static";
}
public function nonStaticMethod() {
echo "I am not static" . self::staticMethod(); // This works nicely.
}
}
$a = new A();
$a->nonStaticMethod(); // I am staticI am not static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment