Skip to content

Instantly share code, notes, and snippets.

@iToto
Last active November 24, 2015 20:45
Show Gist options
  • Save iToto/d4f7aac048a62c4ae21a to your computer and use it in GitHub Desktop.
Save iToto/d4f7aac048a62c4ae21a to your computer and use it in GitHub Desktop.
<?php
class foo
{
public static function hello()
{
echo "Hello ";
}
public static function world()
{
echo "World ";
}
public static function sayHelloWorld()
{
static::hello();
self::world();
echo "\n";
}
}
class bar extends foo
{
public static function hello()
{
echo "Bonjours ";
}
public static function world()
{
echo "Monde ";
}
public static function sayHelloWorld()
{
static::hello();
self::world();
echo "\n";
}
}
foo::sayHelloWorld();
bar::sayHelloWorld();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment