Are the URLs with .html ranking better than the URLs with .php ?

There is no difference between a URL in .html, in .php or even in .aspx. Search engines know how to read the keywords in an URL as long as you properly separate the important keywords with hyphens.

Quick reminder : it is useless to overload your URLs with keywords as it could get you penalized.

SEOSoftware Oseox Monitoring