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 PhabricatorXHPASTViewStreamController extends PhabricatorXHPASTViewPa..

Decoded Output download

<?php

final class PhabricatorXHPASTViewStreamController
  extends PhabricatorXHPASTViewPanelController {

  public function handleRequest(AphrontRequest $request) {
    $storage = $this->getStorageTree();
    $input = $storage->getInput();
    $err = $storage->getReturnCode();
    $stdout = $storage->getStdout();
    $stderr = $storage->getStderr();

    try {
      $tree = XHPASTTree::newFromDataAndResolvedExecFuture(
        $input,
        array($err, $stdout, $stderr));
    } catch (XHPASTSyntaxErrorException $ex) {
      return $this->buildXHPASTViewPanelResponse($ex->getMessage());
    }

    $tokens = array();
    foreach ($tree->getRawTokenStream() as $id => $token) {
      $seq = $id;
      $name = $token->getTypeName();
      $title = pht('Token %d: %s', $seq, $name);

      $tokens[] = phutil_tag(
        'span',
        array(
          'title' => $title,
          'class' => 'token',
        ),
        $token->getValue());
    }

    return $this->buildXHPASTViewPanelResponse(
      phutil_implode_html('', $tokens));
  }
}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorXHPASTViewStreamController
  extends PhabricatorXHPASTViewPanelController {

  public function handleRequest(AphrontRequest $request) {
    $storage = $this->getStorageTree();
    $input = $storage->getInput();
    $err = $storage->getReturnCode();
    $stdout = $storage->getStdout();
    $stderr = $storage->getStderr();

    try {
      $tree = XHPASTTree::newFromDataAndResolvedExecFuture(
        $input,
        array($err, $stdout, $stderr));
    } catch (XHPASTSyntaxErrorException $ex) {
      return $this->buildXHPASTViewPanelResponse($ex->getMessage());
    }

    $tokens = array();
    foreach ($tree->getRawTokenStream() as $id => $token) {
      $seq = $id;
      $name = $token->getTypeName();
      $title = pht('Token %d: %s', $seq, $name);

      $tokens[] = phutil_tag(
        'span',
        array(
          'title' => $title,
          'class' => 'token',
        ),
        $token->getValue());
    }

    return $this->buildXHPASTViewPanelResponse(
      phutil_implode_html('', $tokens));
  }
}

Function Calls

None

Variables

None

Stats

MD5 01bc99ef0d8c403b03f1d8ec5af19a05
Eval Count 0
Decode Time 97 ms