It is up to you what code format to choose. It is not very correct to compare these formats. They are unique in their own way.
HTML is most widely used and probably mostly documented. Code snippet in HTML format can be inserted into .html and .htm pages.
Code snippets in PHP format will work on your .php pages, or CMS websites coded in php. PHP is considered to be better for SEO.