#!/usr/bin/env php input()) { try { ## parse the input ## - check for functions, classes ## - check for multi-line if ($shell->parse() == 0) { $retval = eval($shell->getCode()); if (isset($retval)) { var_dump($retval); } ## reset the cmdline $shell->resetCode(); } } catch(Exception $e) { ## oops, error print $e->getMessage(); $shell->resetCode(); } }