Answer the question
In order to leave comments, you need to log in
How to write correct code (PHP) from IDE point of view?
In general, I write my small CMS in PHP. As an IDE, I use NetBeans 8. I ran into such a problem as understanding the work of my code in the IDE itself.
For example, unlike php in java, everything is laid out "on the shelves" - the classes are in packages, there are import statements that indicate where this or that class comes from - everything is extremely clear.
In php, you have to think about loading classes, with specifying data types for variables using special comments (so that the IDE understands), there are all sorts of include files. Due to such wide possibilities of the IDE, it is difficult to understand the work when (where this or that variable, class, etc. comes from), which is why it is not able to see half of the errors, and the code reorganization tool also does not work correctly (not all changes). Because of all this, I am not comfortable working with PHP.
I would like to hear recommendations about writing the "correct" code from the point of view of the IDE, the list of errors should not be done.
ps Perhaps the wording of the question is not entirely correct.
Answer the question
In order to leave comments, you need to log in
www.php-fig.org/psr/psr-4/ru
blog.jetbrains.com/phpstorm/2014/04/psr-0-psr-4-an...
unlike php in java, everything is laid out "on the shelves" - the classes are in packages
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question