Question: I have two optimization question about the function include.

1. Is it better to use a single php file and include it or use several little files and include them? Which one will be faster?
2. For example, I use a PHP file with `mysql_connect` and all the db connection stuff. Then I include it when I need it. But will it be faster to just write the code when I need it and not include anything?

Also if someone has the actual numbers, I will be a nice plus.

Answer: 
1. The differences will be trivial.
2. [Don't repeat yourself.](http://en.wikipedia.org/wiki/Don%27t_repeat_yourself) Do not put connection information in each file over and over again. Including sounds fine in your case.
3. Stop making use of `mysql_*()`. Use [PDO](http://php.net/manual/en/book.pdo.php) or [MySQLi](http://php.net/manual/en/book.mysqli.php) instead.

You're talking about micro-optimalisation, while it's probably better to start thinking about object oriented programming instead.
PHP include()'s are processed server side, not by the browser or anywhere else so the difference in performance would be negligible. If it helps you keep your code more organized you should include your DB connection info, there won't be a noticeable speed difference.