php5 and php4 at the same time is the same?

I have both php 5 (as main) and php 4 running as cgi.
When a user uploads a script written in php4, apache automatically detects that is php4 and let it run or do I have to specify via .htaccess when is a php4 script??