What are the advantages / disadvantages of monolithic PHP coding compared to small specialized php scripts?

I have historically used a monolithic approach to PHP coding.

That is, I write one index.php with an average size of 70k-250k and use

mod_rewrite

to turn on the rest

REQUEST_URI 

to parameters passed to index.php to control what happens.

An alternative would be to write many small php scripts, each of which specialized in a specific purpose. I think some of my more active ajax scripts might benefit from this.

One thing that kept me in this thought process is that I don’t know how use includes, especially conditional inclusions will affect the performance of the operation code cache.

, , - , , .

mod_rewrite, .

.

EDIT: 80-100 ( ). - ajax. , php .

+1
4

. . , . , , , - .

+6

, , .

. - .

+3

( ), : , , , - , , , 8, 16 32 , .

+1

. , , . , , . , - , , . ( , ). , , . , .

, , . . . , , -, . , (, ) . , .

, , , . 2 , .

, , appoch.

0

Source: https://habr.com/ru/post/1788243/


All Articles