fix - trim the output of the fully rendered php to ensure that DOCTYPE is on the first line (fixes #2359)