Skip to content

Instantly share code, notes, and snippets.

@ryaan-anthony
Created July 13, 2015 16:43
Show Gist options
  • Select an option

  • Save ryaan-anthony/a008ad0f745076fed0e7 to your computer and use it in GitHub Desktop.

Select an option

Save ryaan-anthony/a008ad0f745076fed0e7 to your computer and use it in GitHub Desktop.
<?php
class X
{
const X = 'x';
static function foo()
{
return static::X . self::X . PHP_EOL;
}
}
class Y extends X
{
const X = 'y';
static function foo()
{
return parent::foo();
}
}
echo Y::foo(); // prints yx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment