|
Revision 522, 0.5 kB
(checked in by moo, 10 months ago)
|
|
slide hits per second and hour
|
| Line | |
|---|
| 1 | #! /usr/bin/php -dopen_basedir= |
|---|
| 2 | <?php |
|---|
| 3 | |
|---|
| 4 | $srcdir = dirname(__FILE__); |
|---|
| 5 | require_once("$srcdir/Decompiler.class.php"); |
|---|
| 6 | if (file_exists("$srcdir/phpdc.debug.php")) { |
|---|
| 7 | include("$srcdir/phpdc.debug.php"); |
|---|
| 8 | } |
|---|
| 9 | |
|---|
| 10 | if (!isset($argv)) { |
|---|
| 11 | $argv = $_SERVER['argv']; |
|---|
| 12 | $argc = $_SERVER['argc']; |
|---|
| 13 | } |
|---|
| 14 | |
|---|
| 15 | $dc = new Decompiler(); |
|---|
| 16 | if (isset($argv[1])) { |
|---|
| 17 | $dc->decompileFile($argv[1]); |
|---|
| 18 | } |
|---|
| 19 | else { |
|---|
| 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(); |
|---|