Skip to content

Instantly share code, notes, and snippets.

@cnorthwood
Last active December 17, 2015 06:19
Show Gist options
  • Save cnorthwood/5564150 to your computer and use it in GitHub Desktop.
Save cnorthwood/5564150 to your computer and use it in GitHub Desktop.
why does this not work?
<?php
class Base {
public static $value;
public static function get() {
return static::$value;
}
}
class Child extends Base {
public static $value = 'hello';
}
var_dump(Child::get() == 'hello');
@ShaneMcC
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment