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 final class DivinerArticleAtomizer extends DivinerAtomizer { protected function ..

Decoded Output download

<?php

final class DivinerArticleAtomizer extends DivinerAtomizer {

  protected function executeAtomize($file_name, $file_data) {
    $atom = $this->newAtom(DivinerAtom::TYPE_ARTICLE)
      ->setLine(1)
      ->setLength(count(explode("
", $file_data)))
      ->setLanguage('human');

    $block = "/**
".str_replace("
", "
 * ", $file_data)."
 */";
    $atom->setDocblockRaw($block);

    $meta = $atom->getDocblockMeta();

    $title = idx($meta, 'title');
    if (!strlen($title)) {
      $title = pht('Untitled Article "%s"', basename($file_name));
      $atom->addWarning(pht('Article has no %s!', '@title'));
      $atom->setDocblockMetaValue('title', $title);
    }

    // If the article has no `@name`, use the filename after stripping any
    // extension.
    $name = idx($meta, 'name');
    if (!$name) {
      $name = basename($file_name);
      $name = preg_replace('/\.[^.]+$/', '', $name);
    }
    $atom->setName($name);

    return array($atom);
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class DivinerArticleAtomizer extends DivinerAtomizer {

  protected function executeAtomize($file_name, $file_data) {
    $atom = $this->newAtom(DivinerAtom::TYPE_ARTICLE)
      ->setLine(1)
      ->setLength(count(explode("\n", $file_data)))
      ->setLanguage('human');

    $block = "/**\n".str_replace("\n", "\n * ", $file_data)."\n */";
    $atom->setDocblockRaw($block);

    $meta = $atom->getDocblockMeta();

    $title = idx($meta, 'title');
    if (!strlen($title)) {
      $title = pht('Untitled Article "%s"', basename($file_name));
      $atom->addWarning(pht('Article has no %s!', '@title'));
      $atom->setDocblockMetaValue('title', $title);
    }

    // If the article has no `@name`, use the filename after stripping any
    // extension.
    $name = idx($meta, 'name');
    if (!$name) {
      $name = basename($file_name);
      $name = preg_replace('/\\.[^.]+$/', '', $name);
    }
    $atom->setName($name);

    return array($atom);
  }

}

Function Calls

None

Variables

None

Stats

MD5 619f68d8df65fe6617572c150f03dab1
Eval Count 0
Decode Time 83 ms