added tips to lamer.bash help
[mirrors/Programs.git] / php / skripty / php_shell.php
1 <?php
2
3 if(!isset($__PHP_SHELL__) || $$__PHP_SHELL__ != true) {
4 $__PHP_SHELL__ = true;
5
6 //READLINE Function
7 $__STDIN__ = fopen("php://stdin", "rb");
8 function readline($prompt="") {
9 echo $prompt;
10 return fgets($GLOBALS["__STDIN__"]);
11 }
12 //READLINE End
13
14 }
15
16 ///CODE/////////////////////////////////////////////////
17
18 if($argc > 1) {
19 array_shift($argv);
20 //print_r($argv); //Debug
21 include($argv[0]);
22 die();
23 }
24
25 echo (
26 "PHP CONSOLE\n"
27 ."Coded: Harvie 2oo7\n"
28 ."Version: 0.3\n"
29 ."--------------------------\n"
30 );
31
32 //$loop = 1;
33 $__prompt__ = "\n> ";
34 while(1) {
35 eval(readline($__prompt__));
36 }
37
38 ?>
This page took 0.398437 seconds and 4 git commands to generate.