Skip to content

Instantly share code, notes, and snippets.

Created January 5, 2015 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5e7191f4fd142249d06b to your computer and use it in GitHub Desktop.
Save anonymous/5e7191f4fd142249d06b to your computer and use it in GitHub Desktop.
<?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