PHP template and Shell output to scratch buffer