How many lines of PHP code is too many for one file?

前端 未结 8 2297
日久生厌
日久生厌 2021-02-20 15:55

I\'m creating a PHP file that does 2 mysql database calls and the rest of the script is if statements for things like file_exists and other simple variables. I have about 2000

8条回答
  •  情歌与酒
    2021-02-20 16:18

    It really doesn't matter, so long as you have documented your code properly, modularised as much as possible, and checked for any inefficiencies. You may well have a 10,000 line file. Although I usually split at around 500-1000 for each section of an application.

提交回复
热议问题