/** * * This method gives an error, in case of error during parsing JSON queries * */ public function get_error() { switch (json_last_error()) { case JSON_ERROR_DEPTH : return 'Maximum stack depth exceeded'; break; case JSON_ERROR_CTRL_CHAR : return 'Unexpected control character found'; break; case JSON_ERROR_SYNTAX : return 'Syntax error, malformed JSON'; break; case JSON_ERROR_NONE : return 'No errors'; break; } } } $generator = new QueryGenerator(); $generator->process(); // Get the execution time echo "Execution time : <b>". (microtime(true) - $start_time) ."</b> ms"; ?>