Things to look at when working on a new PHP project

Working on a new project is exciting. The FTP access is here and you start browsing around, looking for familiar territory. But sometimes, it’s nowhere to be found since the project is completely tailor made.

This article will help you look into important parts of any PHP system before starting work. This will allow you to easier identify bugs in the future.

php

Error reporting

Error reporting usually works with another setting called display errors. Basically, error reporting specifies the level of reporting you need. It could go from no reporting to report every single error. Display errors controls whether the error reports are visible or not. The concept is simple, but it’s very easy to get confused.

Memory limit

Each PHP script has to have a memory limit. Otherwise, a script could take up all the memory available for your server. This is exactly what the memory limit setting controls. It allows you to set a cap on the memory usage of any PHP script.

Script time limit

Just like the memory limit, there is also a limit in execution time. This means that when a script reaches that time, the script will be stopped and an error will be produced. This is a good and a bad thing. For example, you could have a page that does a lot of calculation, which means it needs a long execution time.

However, the gain of having a long execution time is negligible since there are better ways to deal with a page that does a lot of calculations.