Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace App\Controller; use Psr\Cache\CacheItemPoolInterface as CachePool; use S..

Decoded Output download

<?php 
 namespace App\Controller; use Psr\Cache\CacheItemPoolInterface as CachePool; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Contracts\Cache\ItemInterface; use GuzzleHttp\Client as HttpClient; use GuzzleHttp\Psr7\Request as GuzzleRequest; use App\Entity\Manager\AnnouncementManager; use App\Entity\Manager\ConfigManager; use App\CloudPanel\Environment as CloudPanelEnvironment; class AppController extends Controller { const HTTP_CLIENT_TIMEOUT = 10; const APP_VERSION_CHECK_REQUEST_URL = "https://version.cloudpanel.io/v2"; public function displayAnnouncement(Request $request, AnnouncementManager $announcementManager) : Response { goto d4aa9; Bfd42: $response = $this->render("Partial/announcement.html.twig", ["announcement" => $announcement]); goto A900f; A900f: return $response; goto d006f; d4aa9: $user = $this->getUser(); goto ee75f; ee75f: $announcement = $announcementManager->findLatestUnreadAnnouncement($user); goto Bfd42; d006f: } public function setAnnouncementRead(Request $request, AnnouncementManager $announcementManager) : Response { goto bf68f; fa861: $announcementId = (int) $request->get("announcementId"); goto c6bdc; e8b91: return $response; goto E8b92; C03a4: f1fed: goto cade9; e396c: f3bb0: goto b8c06; c6bdc: if (!(true === $request->isMethod("POST") && false === empty($announcementId))) { goto cc93f; } goto d7068; b171a: if (!(false === is_null($announcement) && $announcement->getUser()->getId() == $user->getId())) { goto f3bb0; } goto B1225; B1225: $userAnnouncements = $announcementManager->findAllUnreadAnnouncementsForUser($user); goto B683f; cade9: cebc6: goto e396c; b8c06: cc93f: goto e8b91; e63fd: foreach ($userAnnouncements as $announcement) { goto D9314; D7a60: $announcementManager->updateEntity($announcement); goto C202a; C202a: A16c1: goto A6181; D9314: $announcement->setIsRead(true); goto D7a60; A6181: } goto C03a4; B683f: if (!(false === empty($userAnnouncements))) { goto cebc6; } goto e63fd; Bd564: $response = new Response(); goto fa861; bf68f: $user = $this->getUser(); goto Bd564; d7068: $announcement = $announcementManager->findOneById($announcementId); goto b171a; E8b92: } public function checkAppVersion(Request $request, CachePool $cachePool, ConfigManager $configManager) : Response { goto b0906; A02dc: if (!(version_compare($latestAppVersion, $currentAppVersion) > 0)) { goto e5e96; } goto f56d1; b0906: $data = []; goto beea1; aa655: return $this->json($data); goto d6d5c; a56de: $requestUrl = sprintf("%s%s", self::APP_VERSION_CHECK_REQUEST_URL, CloudPanelEnvironment::RELEASE_CHANNEL_TEST == $releaseChannel ? "-test" : ''); goto F5d58; f961a: if (!(false === empty($latestAppVersion) && false === empty($currentAppVersion))) { goto C097d; } goto A02dc; bf916: $currentAppVersion = $this->getParameter("app_version"); goto f961a; F5d58: $latestAppVersion = $cachePool->get("app_version", function (ItemInterface $item) use($requestUrl) { goto ed0e7; b8c0c: return $appVersion; goto e1f62; a85a5: $config = ["timeout" => self::HTTP_CLIENT_TIMEOUT, "verify" => false, "headers" => ["User-Agent" => "CloudPanel v2"]]; goto fbc50; fbc50: try { goto D7d80; D0cd7: $appVersion = trim((string) $response->getBody()); goto f5eb6; f5eb6: d63ca: goto f65a0; Fe700: $responseStatusCode = $response->getStatusCode(); goto E88ef; D2a04: $request = new GuzzleRequest("GET", $requestUrl); goto f4d26; f4d26: $response = $httpClient->send($request); goto Fe700; E88ef: if (!(200 == $responseStatusCode)) { goto d63ca; } goto D0cd7; D7d80: $httpClient = new HttpClient($config); goto D2a04; f65a0: } catch (\Exception $e) { } goto b8c0c; ed0e7: $item->expiresAfter(3600); goto acbd8; acbd8: $appVersion = ''; goto a85a5; e1f62: }); goto bf916; e173b: e5e96: goto E37cb; f56d1: $data["updateAvailable"] = true; goto e173b; E37cb: C097d: goto aa655; beea1: $releaseChannel = (string) $configManager->get("release_channel"); goto a56de; d6d5c: } public function footerNavigation(RequestStack $requestStack) : Response { goto a290d; dc330: $isAdminArea = true === str_contains($requestUri, "admin"); goto a7bc0; a290d: $mainRequest = $requestStack->getMainRequest(); goto be46c; be46c: $requestUri = $mainRequest->getRequestUri(); goto dc330; a7bc0: $response = $this->render("Partial/footer.html.twig", ["isAdminArea" => $isAdminArea]); goto Ca360; Ca360: return $response; goto b4429; b4429: } public function changeLocale(Request $request) : Response { $response = $this->redirectToReferer($request); return $response; } } 
 ?>

Did this file decode correctly?

Original Code

<?php
 namespace App\Controller; use Psr\Cache\CacheItemPoolInterface as CachePool; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Contracts\Cache\ItemInterface; use GuzzleHttp\Client as HttpClient; use GuzzleHttp\Psr7\Request as GuzzleRequest; use App\Entity\Manager\AnnouncementManager; use App\Entity\Manager\ConfigManager; use App\CloudPanel\Environment as CloudPanelEnvironment; class AppController extends Controller { const HTTP_CLIENT_TIMEOUT = 10; const APP_VERSION_CHECK_REQUEST_URL = "\x68\164\164\160\x73\x3a\57\57\166\145\162\x73\x69\157\x6e\x2e\143\154\157\165\x64\160\x61\156\x65\x6c\x2e\x69\x6f\x2f\x76\62"; public function displayAnnouncement(Request $request, AnnouncementManager $announcementManager) : Response { goto d4aa9; Bfd42: $response = $this->render("\120\x61\x72\164\151\141\x6c\x2f\141\156\x6e\157\165\156\143\x65\155\x65\156\164\56\150\164\155\x6c\x2e\x74\167\151\x67", ["\141\x6e\156\x6f\165\156\x63\145\x6d\x65\156\x74" => $announcement]); goto A900f; A900f: return $response; goto d006f; d4aa9: $user = $this->getUser(); goto ee75f; ee75f: $announcement = $announcementManager->findLatestUnreadAnnouncement($user); goto Bfd42; d006f: } public function setAnnouncementRead(Request $request, AnnouncementManager $announcementManager) : Response { goto bf68f; fa861: $announcementId = (int) $request->get("\x61\156\x6e\157\x75\156\x63\145\155\x65\156\x74\x49\144"); goto c6bdc; e8b91: return $response; goto E8b92; C03a4: f1fed: goto cade9; e396c: f3bb0: goto b8c06; c6bdc: if (!(true === $request->isMethod("\x50\117\x53\124") && false === empty($announcementId))) { goto cc93f; } goto d7068; b171a: if (!(false === is_null($announcement) && $announcement->getUser()->getId() == $user->getId())) { goto f3bb0; } goto B1225; B1225: $userAnnouncements = $announcementManager->findAllUnreadAnnouncementsForUser($user); goto B683f; cade9: cebc6: goto e396c; b8c06: cc93f: goto e8b91; e63fd: foreach ($userAnnouncements as $announcement) { goto D9314; D7a60: $announcementManager->updateEntity($announcement); goto C202a; C202a: A16c1: goto A6181; D9314: $announcement->setIsRead(true); goto D7a60; A6181: } goto C03a4; B683f: if (!(false === empty($userAnnouncements))) { goto cebc6; } goto e63fd; Bd564: $response = new Response(); goto fa861; bf68f: $user = $this->getUser(); goto Bd564; d7068: $announcement = $announcementManager->findOneById($announcementId); goto b171a; E8b92: } public function checkAppVersion(Request $request, CachePool $cachePool, ConfigManager $configManager) : Response { goto b0906; A02dc: if (!(version_compare($latestAppVersion, $currentAppVersion) > 0)) { goto e5e96; } goto f56d1; b0906: $data = []; goto beea1; aa655: return $this->json($data); goto d6d5c; a56de: $requestUrl = sprintf("\45\163\x25\163", self::APP_VERSION_CHECK_REQUEST_URL, CloudPanelEnvironment::RELEASE_CHANNEL_TEST == $releaseChannel ? "\x2d\164\x65\163\x74" : ''); goto F5d58; f961a: if (!(false === empty($latestAppVersion) && false === empty($currentAppVersion))) { goto C097d; } goto A02dc; bf916: $currentAppVersion = $this->getParameter("\141\160\x70\x5f\166\x65\x72\x73\151\157\156"); goto f961a; F5d58: $latestAppVersion = $cachePool->get("\141\x70\160\x5f\166\x65\x72\163\151\x6f\156", function (ItemInterface $item) use($requestUrl) { goto ed0e7; b8c0c: return $appVersion; goto e1f62; a85a5: $config = ["\x74\x69\155\145\157\165\164" => self::HTTP_CLIENT_TIMEOUT, "\x76\145\x72\151\x66\171" => false, "\150\145\x61\144\x65\162\163" => ["\125\x73\x65\162\x2d\x41\x67\145\156\164" => "\103\154\157\165\144\x50\141\x6e\x65\154\x20\166\62"]]; goto fbc50; fbc50: try { goto D7d80; D0cd7: $appVersion = trim((string) $response->getBody()); goto f5eb6; f5eb6: d63ca: goto f65a0; Fe700: $responseStatusCode = $response->getStatusCode(); goto E88ef; D2a04: $request = new GuzzleRequest("\x47\105\x54", $requestUrl); goto f4d26; f4d26: $response = $httpClient->send($request); goto Fe700; E88ef: if (!(200 == $responseStatusCode)) { goto d63ca; } goto D0cd7; D7d80: $httpClient = new HttpClient($config); goto D2a04; f65a0: } catch (\Exception $e) { } goto b8c0c; ed0e7: $item->expiresAfter(3600); goto acbd8; acbd8: $appVersion = ''; goto a85a5; e1f62: }); goto bf916; e173b: e5e96: goto E37cb; f56d1: $data["\x75\x70\x64\141\164\x65\101\x76\x61\151\x6c\x61\x62\x6c\x65"] = true; goto e173b; E37cb: C097d: goto aa655; beea1: $releaseChannel = (string) $configManager->get("\162\x65\154\x65\x61\163\x65\137\143\x68\x61\156\x6e\x65\154"); goto a56de; d6d5c: } public function footerNavigation(RequestStack $requestStack) : Response { goto a290d; dc330: $isAdminArea = true === str_contains($requestUri, "\141\144\155\x69\x6e"); goto a7bc0; a290d: $mainRequest = $requestStack->getMainRequest(); goto be46c; be46c: $requestUri = $mainRequest->getRequestUri(); goto dc330; a7bc0: $response = $this->render("\x50\141\162\164\151\x61\x6c\x2f\x66\x6f\x6f\x74\145\162\56\150\x74\155\154\56\x74\x77\x69\147", ["\151\x73\101\144\155\x69\x6e\x41\x72\145\141" => $isAdminArea]); goto Ca360; Ca360: return $response; goto b4429; b4429: } public function changeLocale(Request $request) : Response { $response = $this->redirectToReferer($request); return $response; } }

Function Calls

None

Variables

None

Stats

MD5 388271c7de79f2748427001924032978
Eval Count 0
Decode Time 57 ms