Skip to content

Instantly share code, notes, and snippets.

@thinkingmedia
Created April 26, 2014 14:44
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 thinkingmedia/11321912 to your computer and use it in GitHub Desktop.
Save thinkingmedia/11321912 to your computer and use it in GitHub Desktop.
class main
{
public $nothing = 'some text';
public static $variable = "new variable";
public static function doSomething($main)
{
echo "Do something";
echo "<br>";
echo $main->nothing;
}
public function nothing()
{
echo "Nothing happend here";
echo self::$variable;
echo $this->nothing;
}
}
$var = new main();
$var->nothing();
main::doSomething($var);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment