php - Is it better to split functions into different files?
Get the solution ↓↓↓Solution:
If you have a highly frequented web page, you should organize your code perfectly, because it seems to be more than a guestbook page - otherwise, the project runs out of your control. So put each function into its own file!
Only your second thought should be about performance. You could think about using opcode cache or other improvements like a static-map autoloader, a build script, that merges your php files and stuff.
But don't start to ruin your project's source code with this bad style.
Answer
Solution:
Splitting functions into different files more better than writing all functions in one file
it's make including files more faster and best performance .... because you include only functions you want also you save server memory .
Also it's make you code more readable .
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: undefined array key php
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.