Code sniffing is the practice of checking the code for compliance with some pre-determined standards. It’s very important to run your code through a sniffer because it helps with maintenance and ensures better code quality. The most common standards in PHP are PSR-0, PSR-1, PSR2 and PEAR. These rules might specify details such as depth […]
Tag: PHP
Different ways of running PHP on an Apache server
When the server receives a request from the user it can serve the file directly, but sometimes it needs to translate the code using the appropriate application. Otherwise it would be showing the users the source code of the website. A server like Apache needs to be configured to handle specific content with an appropriate […]
Finding out PHP server interface
There are many ways of executing a PHP script. For example you might run it directly from a command line: Other option, readily available for tesing since PHP 5.4, is to spin up the internal PHP server and see the result in a browser: If you create a simple page with the function php_sapi_name you […]