How best to fit everything in one php file or something to share?
How to do write the complete code in a single file or as a divide less are used in one file, which is often in another. And just load the require_once . And another question if you podgruzhat is it not the same what to write in a single file?
dean.Stoltenberg65 answered on June 10th 19 at 16:15
The question is very abstract.
Do as you (and those who may be working with Your code in the future) easier.
If all the code is +-10 lines to divide it makes no sense :)
In other cases, to divide the code have meaning. The easiest option - duplicate to make things out into separate functions/classes.
rhianna_Fee answered on June 10th 19 at 16:17
If you think software, it is better not to divide. Uploading new file - always an extra operation for the server.
But it is almost never possible to put the code into a single file. So about uploading files as a necessary evil. But if it can be avoided - better to do it.