{"action":"created","issue":{"url":"https://api.github.com/repos/Hexlet/code-reviews/issues/2","repository_url":"https://api.github.com/repos/Hexlet/code-reviews","labels_url":"https://api.github.com/repos/Hexlet/code-reviews/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Hexlet/code-reviews/issues/2/comments","events_url":"https://api.github.com/repos/Hexlet/code-reviews/issues/2/events","html_url":"https://github.com/Hexlet/code-reviews/issues/2","id":144304996,"number":2,"title":"reverseInt","user":{"login":"Yakutoc","id":2895992,"avatar_url":"https://avatars.githubusercontent.com/u/2895992?v=3","gravatar_id":"","url":"https://api.github.com/users/Yakutoc","html_url":"https://github.com/Yakutoc","followers_url":"https://api.github.com/users/Yakutoc/followers","following_url":"https://api.github.com/users/Yakutoc/following{/other_user}","gists_url":"https://api.github.com/users/Yakutoc/gists{/gist_id}","starred_url":"https://api.github.com/users/Yakutoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yakutoc/subscriptions","organizations_url":"https://api.github.com/users/Yakutoc/orgs","repos_url":"https://api.github.com/users/Yakutoc/repos","events_url":"https://api.github.com/users/Yakutoc/events{/privacy}","received_events_url":"https://api.github.com/users/Yakutoc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-29T15:43:49Z","updated_at":"2016-03-29T17:58:50Z","closed_at":null,"body":"Реализуйте функцию **reverseInt**, которая переворачивает цифры в переданном числе:\r\n\r\n31 == reverseInt(13);\r\n-321 == reverseInt(-123);\r\n\r\n```\r\n<?php\r\nfunction reverseInt($num){\r\n\r\n  $orig_arr = str_split($num);\r\n\r\n  $reverse_arr = [];\r\n\r\n  for ($i = sizeof($orig_arr) - 1; $i >= 0; $i--){\r\n    if ($orig_arr[0] == \"-\"){\r\n      $reverse_arr[0] = \"-\";\r\n    }\r\n      $reverse_arr[] = $orig_arr[$i];\r\n  }\r\n\r\n  return (int)$reverse = implode(\"\",$reverse_arr);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Hexlet/code-reviews/issues/comments/203027896","html_url":"https://github.com/Hexlet/code-reviews/issues/2#issuecomment-203027896","issue_url":"https://api.github.com/repos/Hexlet/code-reviews/issues/2","id":203027896,"user":{"login":"codeskull","id":5960795,"avatar_url":"https://avatars.githubusercontent.com/u/5960795?v=3","gravatar_id":"","url":"https://api.github.com/users/codeskull","html_url":"https://github.com/codeskull","followers_url":"https://api.github.com/users/codeskull/followers","following_url":"https://api.github.com/users/codeskull/following{/other_user}","gists_url":"https://api.github.com/users/codeskull/gists{/gist_id}","starred_url":"https://api.github.com/users/codeskull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeskull/subscriptions","organizations_url":"https://api.github.com/users/codeskull/orgs","repos_url":"https://api.github.com/users/codeskull/repos","events_url":"https://api.github.com/users/codeskull/events{/privacy}","received_events_url":"https://api.github.com/users/codeskull/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T17:58:50Z","updated_at":"2016-03-29T17:58:50Z","body":"```\r\nphp > echo reverseInt(-0.123);\r\n-321\r\n```"}}