<?php $tidy = tidy_parse_file('file.php');$tidy->cleanRepair(); if(!empty($tidy->errorBuffer)) { echo "The following errors or warnings occured:\n"; echo $tidy->errorBuffer; }?>