I had a debate with my boss.
Which one is more convenient, efficient, standard.
Do we apply memory_limit in php.ini
or
do we just insert a code in php files like this
ini_set('memory_limit','4096M');
Which kind are you?
I had a debate with my boss.
Which one is more convenient, efficient, standard.
Do we apply memory_limit in php.ini
or
do we just insert a code in php files like this
ini_set('memory_limit','4096M');
Which kind are you?
Copyright © 2021 Jogjafile Inc.
Changing the
memory_limitinphp.inifile will change it for all your PHP scripts running on that executable.Using the
ini_setwill modify the configuration only for the script in which it is called and will end with the completion of the script's execution.In a nutshell, the first one is a system-wide permanent change and the other one is a local to script change only during runtime.
Ref: PHP: ini_set - Manual, PHP Memory limit increase