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 Symfony\Component\HttpFoundation\Request; use Symfon..

Decoded Output download

<?php 
 namespace App\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as BaseController; use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException; use Symfony\Component\Form\Form; use App\Service\Logger; use App\Util\Retry; class Controller extends BaseController { protected array $formErrors = []; protected Logger $logger; protected TranslatorInterface $translator; public function __construct(TranslatorInterface $translator, Logger $logger) { $this->translator = $translator; $this->logger = $logger; } protected function getErrorMessages(Form $form) : array { goto b1287; C6184: if (!count($formErrors)) { goto Ce928; } goto c9e49; f0b0b: foreach ($formChildren as $child) { goto a84c3; E07c8: foreach ($childErrors as $childError) { goto C5f70; aee9a: if ($label) { goto bbb61; } goto dbf9d; B9193: goto ae73d; goto Cfbb5; C5f70: $label = $this->translator->trans($child->getConfig()->getOption("label")); goto aee9a; C47e0: $message = sprintf("%s: %s", $label, $childError->getMessage()); goto de567; da9ec: $errors[] = $message; goto afec8; de567: ae73d: goto da9ec; Cfbb5: bbb61: goto C47e0; dbf9d: $message = $childError->getMessage(); goto B9193; afec8: ad863: goto F9dd6; F9dd6: } goto B97ca; B15d7: $childErrors = $child->getErrors(true); goto E07c8; ddc19: Fd793: goto Cbb58; a84c3: if (!(false === $child->isValid())) { goto Fd793; } goto B15d7; Cbb58: F3b40: goto a682f; B97ca: Ca267: goto ddc19; a682f: } goto c0fa9; A94cf: Ce928: goto f0b0b; Df1d9: return $errors; goto b95b1; b1287: $errors = []; goto aed46; aed46: $formChildren = $form->all(); goto A5a35; c9e49: foreach ($formErrors as $formError) { $errors[] = $formError->getMessage(); bb826: } goto Ec3f1; Ec3f1: af4f6: goto A94cf; A5a35: $formErrors = $form->getErrors(); goto C6184; c0fa9: A9b5f: goto Df1d9; b95b1: } protected function redirectToReferer(Request $request) : Response { $referer = $request->headers->get("referer"); return new RedirectResponse($referer); } protected function retry(callable $fn, $retries = 2, $delay = 3) { return Retry::retry($fn, $retries, $delay); } protected function checkCsrfToken(Request $request, string $id) : void { goto B5a99; e439b: $isCsrfTokenValid = $this->isCsrfTokenValid($id, $token); goto efd40; efd40: if (!(false === $isCsrfTokenValid)) { goto b1b03; } goto Aa8f3; B5a99: $token = $request->query->get("token"); goto e439b; Aa8f3: throw new InvalidCsrfTokenException("The CSRF token is invalid."); goto fbf0a; fbf0a: b1b03: goto c5e3f; c5e3f: } } 
 ?>

Did this file decode correctly?

Original Code

<?php
 namespace App\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Contracts\Translation\TranslatorInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as BaseController; use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException; use Symfony\Component\Form\Form; use App\Service\Logger; use App\Util\Retry; class Controller extends BaseController { protected array $formErrors = []; protected Logger $logger; protected TranslatorInterface $translator; public function __construct(TranslatorInterface $translator, Logger $logger) { $this->translator = $translator; $this->logger = $logger; } protected function getErrorMessages(Form $form) : array { goto b1287; C6184: if (!count($formErrors)) { goto Ce928; } goto c9e49; f0b0b: foreach ($formChildren as $child) { goto a84c3; E07c8: foreach ($childErrors as $childError) { goto C5f70; aee9a: if ($label) { goto bbb61; } goto dbf9d; B9193: goto ae73d; goto Cfbb5; C5f70: $label = $this->translator->trans($child->getConfig()->getOption("\x6c\141\142\x65\x6c")); goto aee9a; C47e0: $message = sprintf("\x25\x73\x3a\x20\x25\x73", $label, $childError->getMessage()); goto de567; da9ec: $errors[] = $message; goto afec8; de567: ae73d: goto da9ec; Cfbb5: bbb61: goto C47e0; dbf9d: $message = $childError->getMessage(); goto B9193; afec8: ad863: goto F9dd6; F9dd6: } goto B97ca; B15d7: $childErrors = $child->getErrors(true); goto E07c8; ddc19: Fd793: goto Cbb58; a84c3: if (!(false === $child->isValid())) { goto Fd793; } goto B15d7; Cbb58: F3b40: goto a682f; B97ca: Ca267: goto ddc19; a682f: } goto c0fa9; A94cf: Ce928: goto f0b0b; Df1d9: return $errors; goto b95b1; b1287: $errors = []; goto aed46; aed46: $formChildren = $form->all(); goto A5a35; c9e49: foreach ($formErrors as $formError) { $errors[] = $formError->getMessage(); bb826: } goto Ec3f1; Ec3f1: af4f6: goto A94cf; A5a35: $formErrors = $form->getErrors(); goto C6184; c0fa9: A9b5f: goto Df1d9; b95b1: } protected function redirectToReferer(Request $request) : Response { $referer = $request->headers->get("\162\145\146\145\x72\145\x72"); return new RedirectResponse($referer); } protected function retry(callable $fn, $retries = 2, $delay = 3) { return Retry::retry($fn, $retries, $delay); } protected function checkCsrfToken(Request $request, string $id) : void { goto B5a99; e439b: $isCsrfTokenValid = $this->isCsrfTokenValid($id, $token); goto efd40; efd40: if (!(false === $isCsrfTokenValid)) { goto b1b03; } goto Aa8f3; B5a99: $token = $request->query->get("\164\157\153\145\156"); goto e439b; Aa8f3: throw new InvalidCsrfTokenException("\124\x68\145\40\103\123\122\106\x20\164\157\153\x65\156\40\x69\x73\40\151\x6e\x76\141\x6c\x69\x64\x2e"); goto fbf0a; fbf0a: b1b03: goto c5e3f; c5e3f: } }

Function Calls

None

Variables

None

Stats

MD5 3705a17c8354b63283c0cac45f6b05c2
Eval Count 0
Decode Time 35 ms