Shell

console($input = ”)

21: 	function console($input = '') {
22: 		while (true) {
23: 			ob_start();
24: 			fwrite(STDOUT, "> ");
25: 			$input = trim(fgets(STDIN));
26: 			if ($input == 'quit' || $input == 'exit' || feof(STDIN)) {
27: 				break;
28: 			}
29: 			eval($input);
30: 			$content = ob_get_contents();
31: 			ob_end_clean();
32: 			print !empty ($content) ? $content . "n" : '';
33: 		}
34: 	}

File: lib/support/Shell.php, #line 21

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>