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\Http\Controllers\Installer\Helpers; class RequirementsChecker { priva..

Decoded Output download

<?php 
namespace App\Http\Controllers\Installer\Helpers; class RequirementsChecker { private $_minPhpVersion = "7.2.0"; public function check(array $requirements) { $results = []; foreach ($requirements as $type => $requirement) { switch ($type) { case "php": foreach ($requirements[$type] as $requirement) { $results["requirements"][$type][$requirement] = true; if (extension_loaded($requirement)) { goto BBx5p; } $results["requirements"][$type][$requirement] = false; $results["errors"] = true; BBx5p: bBDrt: } HsDRN: goto blNfv; case "apache": foreach ($requirements[$type] as $requirement) { if (!function_exists("apache_get_modules")) { goto ZkT0Q; } $results["requirements"][$type][$requirement] = true; if (in_array($requirement, apache_get_modules())) { goto T2gqX; } $results["requirements"][$type][$requirement] = false; $results["errors"] = true; T2gqX: ZkT0Q: UDzTa: } VQvCs: goto blNfv; } V6ReN: blNfv: v1Hgj: } M03xB: return $results; } public function checkPHPversion(string $minPhpVersion = null, string $maxPhpVersion = null) { $currentPhpVersion = $this->getPhpVersionInfo(); $supported = false; if (!($minPhpVersion == null)) { goto Cigd9; } $minPhpVersion = $this->getMinPhpVersion(); Cigd9: if ($maxPhpVersion == null && version_compare($currentPhpVersion["version"], $minPhpVersion, ">=")) { goto DXkuh; } if (version_compare($currentPhpVersion["version"], $minPhpVersion, ">=") && version_compare($currentPhpVersion["version"], $maxPhpVersion, "<=")) { goto YkTpc; } goto Yx2DL; DXkuh: $supported = true; goto Yx2DL; YkTpc: $supported = true; Yx2DL: $phpStatus = ["full" => $currentPhpVersion["full"], "current" => $currentPhpVersion["version"], "minimum" => $minPhpVersion, "maximum" => $maxPhpVersion, "supported" => $supported]; return $phpStatus; } private static function getPhpVersionInfo() { $currentVersionFull = PHP_VERSION; preg_match("#^\d+(\.\d+)*#", $currentVersionFull, $filtered); $currentVersion = $filtered[0]; return ["full" => $currentVersionFull, "version" => $currentVersion]; } protected function getMinPhpVersion() { return $this->_minPhpVersion; } } 
 ?>

Did this file decode correctly?

Original Code

<?php
namespace App\Http\Controllers\Installer\Helpers; class RequirementsChecker { private $_minPhpVersion = "\x37\x2e\x32\x2e\60"; public function check(array $requirements) { $results = []; foreach ($requirements as $type => $requirement) { switch ($type) { case "\x70\x68\x70": foreach ($requirements[$type] as $requirement) { $results["\162\x65\161\x75\x69\x72\145\x6d\x65\x6e\x74\163"][$type][$requirement] = true; if (extension_loaded($requirement)) { goto BBx5p; } $results["\x72\x65\161\165\x69\x72\x65\x6d\145\x6e\164\x73"][$type][$requirement] = false; $results["\145\162\x72\157\x72\163"] = true; BBx5p: bBDrt: } HsDRN: goto blNfv; case "\x61\x70\x61\x63\x68\145": foreach ($requirements[$type] as $requirement) { if (!function_exists("\x61\160\141\x63\x68\x65\x5f\x67\x65\x74\x5f\x6d\157\144\x75\154\x65\163")) { goto ZkT0Q; } $results["\x72\x65\161\x75\x69\162\145\155\145\156\164\163"][$type][$requirement] = true; if (in_array($requirement, apache_get_modules())) { goto T2gqX; } $results["\x72\145\x71\165\x69\162\x65\x6d\145\156\164\163"][$type][$requirement] = false; $results["\x65\162\162\x6f\162\x73"] = true; T2gqX: ZkT0Q: UDzTa: } VQvCs: goto blNfv; } V6ReN: blNfv: v1Hgj: } M03xB: return $results; } public function checkPHPversion(string $minPhpVersion = null, string $maxPhpVersion = null) { $currentPhpVersion = $this->getPhpVersionInfo(); $supported = false; if (!($minPhpVersion == null)) { goto Cigd9; } $minPhpVersion = $this->getMinPhpVersion(); Cigd9: if ($maxPhpVersion == null && version_compare($currentPhpVersion["\166\145\162\163\151\157\156"], $minPhpVersion, "\x3e\75")) { goto DXkuh; } if (version_compare($currentPhpVersion["\x76\145\162\163\x69\x6f\156"], $minPhpVersion, "\x3e\75") && version_compare($currentPhpVersion["\x76\145\162\x73\151\x6f\x6e"], $maxPhpVersion, "\74\75")) { goto YkTpc; } goto Yx2DL; DXkuh: $supported = true; goto Yx2DL; YkTpc: $supported = true; Yx2DL: $phpStatus = ["\146\x75\154\154" => $currentPhpVersion["\x66\x75\154\x6c"], "\x63\165\162\162\145\156\x74" => $currentPhpVersion["\166\x65\162\163\x69\157\156"], "\155\151\x6e\151\155\x75\155" => $minPhpVersion, "\155\141\170\151\x6d\x75\x6d" => $maxPhpVersion, "\x73\165\x70\160\x6f\x72\164\x65\144" => $supported]; return $phpStatus; } private static function getPhpVersionInfo() { $currentVersionFull = PHP_VERSION; preg_match("\43\x5e\134\144\x2b\x28\134\x2e\x5c\144\53\51\x2a\43", $currentVersionFull, $filtered); $currentVersion = $filtered[0]; return ["\x66\165\154\x6c" => $currentVersionFull, "\x76\x65\x72\x73\x69\157\156" => $currentVersion]; } protected function getMinPhpVersion() { return $this->_minPhpVersion; } }

Function Calls

None

Variables

None

Stats

MD5 39c54a4382e7249c6de982146e148aa2
Eval Count 0
Decode Time 47 ms