A files extension means absolutely nothing to PHP, PHP could care less what extension the file has. .inc .foo .php .phtml .whateveryouwant ... all can be included just the same. What does matter is PHP tags, PHP tags will get parsed nomatter the extension.
Now the web server is a different story. You can tell your web server to parse .php as PHP, this is common, but you can also tell it to parse .anythingyouwant extensions as PHP, or Perl, or not at all. Typically .inc shows as plain text because the web server doesn't recognize and passes it off as the default type, which is often type text.
Using .php as an extension is okay but certainly not ideal because most likely you don't want the code to parse at all when called by itself. Ideally you'd use an extension that won't parse at all and better yet these files will be outside the document root but in the real world people put includes in the document root. An example for disallowing direct access to .inc files through Apache via .htaccess or httpd.conf is:
<Files "*.inc">
Order allow,deny
Deny from all
</Files>