I am calling a SOAP function in PHP, which returns a string array. Is there a maximum allowed size of this returned array? If yes, what is that maximum?
1条回答 默认 最新
- douwen7331 2017-04-06 19:27关注
The default amount of memory that PHP allows a script to allocate is 128 MB, and this includes variables such as arrays.
This 128 MB limit can be overridden globally by changing the
memory_limit
option in thephp.ini
. Changing the setting to -1 means "unlimited".It can also be overridden on a per script basis by using the
ini_set
function:ini_set('memory_limit', '-1'); // Unlimited RAM
When "unlimited" is used, the size of your array is determined by the amount of available RAM on your machine.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报