Does it make any difference to use .class.php?

Asked

Viewed 58 times

0

Change something to use .class.php example: Conn.class.php

Whenever I search about appears about class and the programming itself!

  • As far as I know no, what matters is the last point, the . class is placed only by organization (what are classes and what are not)

  • Related or duplicate: https://answall.com/q/266120/101

1 answer

1


Talking about conventions, like PSR4, one should not put the .class.php because it will influence the autoload road-class namespace.

Other than that, it doesn’t change anything. Actually, it doesn’t even need .php, it is only used to facilitate the webserver that file it should delegate to the PHP interpreter.

Another example are command line applications that have no extension at all, such as composer for example.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.