Created
June 13, 2016 07:21
-
-
Save ikuwow/c3ba2f87afcf8cb8fdb89e68d9c341d7 to your computer and use it in GitHub Desktop.
this_is_teratail2.php
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 | |
| /** | |
| * teratail | |
| * | |
| * by Leverages Co. Ltd. Technology Media Lab | |
| */ | |
| function teratail(AwesomeEngineer $you) { | |
| if (!isset($you->problems)) { | |
| return "I am always happy."; | |
| } | |
| $question = new Question($you->problems); | |
| $you->postQuestion($question); | |
| while (!$question->resolved) { | |
| $you->wait_for_answers(); | |
| $answers = $you->getAnsweres(); | |
| if (!is_null($answers)) { | |
| if ($you->resolveQuestions($answers)) { | |
| $you->question->resolved = true; | |
| $you->appreciate("Thank you!"); | |
| break; | |
| } | |
| } | |
| } | |
| return ($engineer->evolve()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment