source: trunk/phpdc.phpr @ 1

Last change on this file since 1 was 1, checked in by moo, 8 years ago

initial import to online

File size: 561 bytes
RevLine 
[1]1#!/usr/bin/php -dopen_basedir=
2<?php
3
4$srcdir = dirname(__FILE__);
5require_once("$srcdir/Decompiler.class.php");
6if (file_exists("$srcdir/phpdc.debug.php")) {
7    include("$srcdir/phpdc.debug.php");
8}
9
10if (!isset($argv)) {
11    $argv = $_SERVER['argv'];
12    $argc = $_SERVER['argc'];
13}
14
15$dc = &new Decompiler();
16if (isset($argv[1])) {
17    $dc->decompileFile($argv[1]);
18}
19else {
20    $phpcode = '';
21    if (!defined('stdin')) {
22        define('stdin', fopen('php://stdin', 'rb'));
23    }
24    while (!feof(stdin)) {
25        $phpcode .= fgets(stdin);
26    }
27    $dc->decompileFile($phpcode);
28}
29$dc->output();
30
Note: See TracBrowser for help on using the repository browser.