Example of running a PHP script in CLI with custom memory limit:
php -d memory_limit=64M my_script.php
Source: http://cristian-radulescu.ro/article/php-cli-increase-memory-limit.html
Example of running a PHP script in CLI with custom memory limit:
php -d memory_limit=64M my_script.php
Source: http://cristian-radulescu.ro/article/php-cli-increase-memory-limit.html