Efficiency for including files of functions (in PHP)

后端 未结 5 1834
-上瘾入骨i
-上瘾入骨i 2020-12-11 02:12

If I had a large number of functions would it be better to keep them all in one large file or would it be better to separate them into several files of related functions. By

5条回答
  •  一向
    一向 (楼主)
    2020-12-11 03:10

    You want to be sure you're using a PHP cache like XCache or APC. Your PHP files should then all be in memory and you shouldn't be worried about your includes hitting the disk at all.

    I would definitely find it easier if you broke up like minded functions/classes into their own files.

提交回复
热议问题