PHP memory limit and RAM differences
PHP memory limit setting applies to maximum memory limit which is used by a single request/script/process. It helps prevent poorly written scripts from consuming all available memory on a server. For instance, if 3 PHP scripts are simultaneously using 100 MB of memory each, that might total to 300MB of memory usage, and a PHP limit of 128MB wouldn’t be hit.
The RAM is liable for storing and making all the data needed to run a process or script available. Basically, the system’s RAM itself is what will allocate memory to these processes or scripts also as leaving some reserved memory to make sure the proper function of other programs/services in a system