I know they can't if it's a .php file but if it is in tags inside a .html file?
I couldn't find any info on this on google so I had to ask here.
As people have stated in the comments they cannot see your code as long as the server is configured correctly.
However, many web servers will eventually have their configuration files edited which from time to time will cause an error that would leave your code visible until fixed. If you have somewhat sensitive material in your PHP code (such as an API key) then you might consider issues such as the following: