What is the memory limit of php 7?

Asked

Viewed 727 times

1

I read somewhere (and now I’m not finding where) that in php version 7 there is no memory lilmite. That is, the memory that can be allocated would be the machine’s RAM. Does it proceed? Has anyone read anything about it?

  • 3

    the limit is hardware capacity.

  • you managed to find where it says?

1 answer

4


According to the manual:

memory_limit integer

Sets the maximum amount of memory in bytes a script is allowed to allocate. This helps prevent scripts badly written consume all available memory on the server. Note that to have no memory limit, set this directive to -1.

http://php.net/manual/en/ini.core.php#ini.memory-limit

I have already noticed that in previous versions, PHP limited the memory in 4GB, so the most that could reach was 4GB - 1MB:

ini_set('memory_limit', '4095M');
  • That, I was worried about a php7 script stealing all the server memory and harming other projects.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.