The memory that PHP can use is defined in php.ini and is called memory_limit.
for example (in php.ini):
; Maximum amount of memory a script may consume ; https://php.net/memory-limit memory_limit = 1024M
will set the available memory to 1 Gigabyte.