Last active
November 24, 2015 20:45
-
-
Save iToto/d4f7aac048a62c4ae21a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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