How to get PHP Memory Limit?

If you want to check your PHP memory limit, you can do this in your php.ini file.

Alternatively, you can also check the Memory Limit in your PHP code.

Just use this code:


echo ini_get('memory_limit');


To change the PHP memory limit, find the memory_limit line in your php.ini, change its value and restart the webserver.