This is only if you want to set this limit that high for everything. If you just need to rise the limit for a script, called from the command line, I still advise to set the override like this:
php71 -dmemory_limit=1500M /path/to/script.php
This way, standard PHP scripts ran by apache are still limited to a more reasonable value