Skip to content

Instantly share code, notes, and snippets.

@till
Created October 19, 2010 16:28
Show Gist options
  • Select an option

  • Save till/634501 to your computer and use it in GitHub Desktop.

Select an option

Save till/634501 to your computer and use it in GitHub Desktop.
<?php
class Tester
{
private static $foo;
public function __construct()
{
self::$foo = true;
}
public function bar()
{
if (self::$foo) {
echo 'I can haz $foo';
} else {
echo 'No $foo';
}
}
}
$tester = new Tester;
$tester->bar();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment