Guru: Speed Up Command-Line PHP
January 21, 2019 Alan Seiden
While PHP runs quickly via the Apache web server, command-line PHP scripts (run from PASE directly or via CL or RPG) have a lag on start-up. In this article, I show how to speed up PHP when called from the command line (known as PHP-CLI).
Why does PHP-CLI (command line PHP) have a slow start-up? While several reasons are often given, I’ve found the culprit to be the loading of PHP extensions that are enabled by php.ini and other configuration files of Zend Server. Examples of extensions are ibm_db2, simplexml, and Zend’s proprietary components.
Within a normal web server environment, …Read more