function &getQuestion($question_type) { static $objs, $question_classes; if (isset($objs[$question_type])) { return $objs[$question_type]; } $question_classes = TestQuestions::getQuestionClasses(); if (isset($question_classes[$question_type])) { global $savant; $objs[$question_type] = new $question_classes[$question_type]($savant); } else { return FALSE; } return $objs[$question_type]; }