How to override PHP memory limit on the command line

Use -d memory_limit=512M to override the memory limit or other PHP parameters on the command line without modifying php.ini:

php -d memory_limit=512M script.php