{"action":"opened","issue":{"url":"https://api.github.com/repos/aalexeev239/php-study/issues/1","labels_url":"https://api.github.com/repos/aalexeev239/php-study/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/aalexeev239/php-study/issues/1/comments","events_url":"https://api.github.com/repos/aalexeev239/php-study/issues/1/events","html_url":"https://github.com/aalexeev239/php-study/issues/1","id":64578707,"number":1,"title":"move output to array","user":{"login":"aalexeev239","id":6787602,"avatar_url":"https://avatars.githubusercontent.com/u/6787602?v=3","gravatar_id":"","url":"https://api.github.com/users/aalexeev239","html_url":"https://github.com/aalexeev239","followers_url":"https://api.github.com/users/aalexeev239/followers","following_url":"https://api.github.com/users/aalexeev239/following{/other_user}","gists_url":"https://api.github.com/users/aalexeev239/gists{/gist_id}","starred_url":"https://api.github.com/users/aalexeev239/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalexeev239/subscriptions","organizations_url":"https://api.github.com/users/aalexeev239/orgs","repos_url":"https://api.github.com/users/aalexeev239/repos","events_url":"https://api.github.com/users/aalexeev239/events{/privacy}","received_events_url":"https://api.github.com/users/aalexeev239/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-26T16:47:28Z","updated_at":"2015-03-26T16:47:28Z","closed_at":null,"body":"<?php\r\n\r\n\r\nfunction upperEverySecondChar($str) {\r\n  $length = mb_strlen($str);\r\n  $clone = \"\";\r\n  $flag = false;\r\n  for ($i=0; $i < $length; $i++) {\r\n    $symbol = mb_substr($str, $i, 1);\r\n    $clone .= $flag? mb_strtoupper($symbol) : $symbol;\r\n    $flag = !$flag;\r\n  }\r\n  return $clone;\r\n}\r\n\r\n$tasks = [\r\n    1 => [\r\n        'title' => 'Задание 1',\r\n        'description' => 'blahblahblah',\r\n        'function' => 'wordCount',\r\n    ]\r\n\r\n];\r\n\r\n$taskNum = isset($_POST['task']) ? $_POST['task'] : '';\r\n\r\n$task = $tasks[$taskNum];\r\n\r\n$task['title'];\r\n\r\ncall_user_func($task['function'], $inputString);\r\n"}}