/** * ==================================================================== * CONVERT STRING OF VALUE INTO EXECUTABLE PHP CODE * ==================================================================== * * -- CODE: ----------------------------------------------------------- * * var_dump(Converter::phpEval('echo 1 + 1;')); * * -------------------------------------------------------------------- * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Parameter | Type | Description * --------- | ------ | ---------------------------------------------- * $input | string | The PHP string to be converted * --------- | ------ | ---------------------------------------------- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * */ public static function phpEval($input) { ob_start(); extract(Shield::cargo()); // include default variables ... eval($input); return ob_get_clean(); }