Created
January 5, 2015 06:09
-
-
Save anonymous/5e7191f4fd142249d06b to your computer and use it in GitHub Desktop.
This file contains 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 | |
error_reporting(E_ALL); | |
class_a::init(); | |
class class_a{ | |
public static $other_class_name = 'class_b'; | |
public static function init(){ | |
call_user_func(array(self::$other_class_name, 'init')); | |
} | |
} | |
class class_b{ | |
public static function init(){ | |
echo 'i am class_b'; | |
} | |
} | |
class class_c{ | |
public static function init(){ | |
echo 'i am class_c'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment