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

Signing you up...

Thank you for signing up!

PHP Decode

function aplVerifyDateTime($datetime, $format) { $result = false; if (!(!empty($dat..

Decoded Output download

<?  function aplVerifyDateTime($datetime, $format) 
{ 
  $result = false; 
  if (!(!empty($datetime) && !empty($format))) { 
    goto EtiLN; 
  } 
  $datetime = DateTime::createFromFormat($format, $datetime); 
  $errors = DateTime::getLastErrors(); 
  if (!($datetime && empty($errors["warning_count"]))) { 
    goto VJXl3; 
  } 
  $result = true; 
  VJXl3: 
  EtiLN: 
  return $result; 
} 
function aplGetDaysBetweenDates($date_from, $date_to) 
{ 
  $number_of_days = 0; 
  if (!(aplVerifyDateTime($date_from, "Y-m-d") && aplVerifyDateTime($date_to, "Y-m-d"))) { 
    goto PFbyG; 
  } 
  $date_to = new DateTime($date_to); 
  $date_from = new DateTime($date_from); 
  $number_of_days = $date_from->diff($date_to)->format("%a"); 
  PFbyG: 
  return $number_of_days; 
} 
function aplParseXmlTags($content, $tag_name) 
{ 
  $parsed_value = null; 
  if (!(!empty($content) && !empty($tag_name))) { 
    goto kmN87; 
  } 
  preg_match_all("/<" . preg_quote($tag_name, "/") . ">(.*?)<\/" . preg_quote($tag_name, "/") . ">/ims", $content, $output_array, PREG_SET_ORDER); 
  if (empty($output_array[0][1])) { 
    goto VePHc; 
  } 
  $parsed_value = trim($output_array[0][1]); 
  VePHc: 
  kmN87: 
  return $parsed_value; 
} ?>

Did this file decode correctly?

Original Code

function aplVerifyDateTime($datetime, $format)
{
  $result = false;
  if (!(!empty($datetime) && !empty($format))) {
    goto EtiLN;
  }
  $datetime = DateTime::createFromFormat($format, $datetime);
  $errors = DateTime::getLastErrors();
  if (!($datetime && empty($errors["\x77\141\162\x6e\x69\156\147\x5f\143\157\165\x6e\x74"]))) {
    goto VJXl3;
  }
  $result = true;
  VJXl3:
  EtiLN:
  return $result;
}
function aplGetDaysBetweenDates($date_from, $date_to)
{
  $number_of_days = 0;
  if (!(aplVerifyDateTime($date_from, "\x59\55\155\x2d\x64") && aplVerifyDateTime($date_to, "\131\x2d\x6d\55\144"))) {
    goto PFbyG;
  }
  $date_to = new DateTime($date_to);
  $date_from = new DateTime($date_from);
  $number_of_days = $date_from->diff($date_to)->format("\x25\141");
  PFbyG:
  return $number_of_days;
}
function aplParseXmlTags($content, $tag_name)
{
  $parsed_value = null;
  if (!(!empty($content) && !empty($tag_name))) {
    goto kmN87;
  }
  preg_match_all("\x2f\74" . preg_quote($tag_name, "\57") . "\76\x28\x2e\x2a\x3f\x29\74\134\x2f" . preg_quote($tag_name, "\x2f") . "\x3e\x2f\151\x6d\163", $content, $output_array, PREG_SET_ORDER);
  if (empty($output_array[0][1])) {
    goto VePHc;
  }
  $parsed_value = trim($output_array[0][1]);
  VePHc:
  kmN87:
  return $parsed_value;
}

Function Calls

None

Variables

None

Stats

MD5 e5b4fe48d5e7c4300813acf183fd403f
Eval Count 0
Decode Time 38 ms