# PHP best practice: Choose 1 big PHP or alot of small ones?

**URL:** <https://forum.kirupa.com/t/php-best-practice-choose-1-big-php-or-alot-of-small-ones/325642>\
**Category:** programming\
**Created:** [October 27, 2011, 11:39am UTC](https://forum.kirupa.com/t/php-best-practice-choose-1-big-php-or-alot-of-small-ones/325642 "2011-10-27T11:39:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruiganga](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ruiganga/32/3679_2.png) [@ruiganga](https://forum.kirupa.com/u/ruiganga)\
**Post date:** [October 27, 2011, 11:39am UTC](https://forum.kirupa.com/t/php-best-practice-choose-1-big-php-or-alot-of-small-ones/325642/1 "2011-10-27T11:39:45Z")

</div>

Hi

My concern is about best pratice.

I have a PHP that generates PDF using TCPDF. I am using switch to choose specific code for specific files to generate. Inside each switch I have a bunch of code.

Should I still work like it is or should I call outside PHPs inside each switch with the specific code for it?

Thanks in advance.
