I have been digging in the drupal installation folder and found some .inc file. So they stand for ‘include’, but I’m wondering if there are .class extension for PHP made to distinguish that the file is a class?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
.classextension is typically used for Java classfiles. While there’s no technical reason why you can’t use it for your PHP include files, doing so will be confusing to other developers, as it may associate the files with a Java virtual machine, rather than with a text editor. It may additionally open you to some security issues:.classfiles, as well as.incfiles, will be made available for download if they are directly accessible from your web root. Both from a security perspective and for the benefit of other developers, you’re best off using the.phpextension for all PHP files.