On absolut PHP advanced (V3) it is limited to 128MB ram. But if you get suspended because of high resource usage it isn't only ram that counts, but also how much processor your script uses. If you want to know how resource heavy a script is, you can monitor the time it takes to generate and the peak ram usage.
Top of php:
PHP:
$starttime = explode(' ', microtime()); $starttime = $starttime[1] + $starttime[0];
Bottom of php:
PHP:
$loadtime = explode(' ', microtime()); $loadtime = $loadtime[0]+$loadtime[1]-$starttime; echo 'Page generated in ',round($loadtime, 2),' seconds. Peak memory usage: ',round(memory_get_peak_usage()/1048576, 2), 'MB';
If you use a lot of ram and little time, it's fine, if you take long time but little ram, it's not so good, if you use both high ram and long time, you probably know why you get suspended. Try putting a few times unset() in your script for variables you don't need anymore for example if I have at the top an array of a few thousand elements eating a lot of ram, but don't need it anymore in the middle, I can use unset($arrayname). If you have a "for" statement with an echo in it, put ob_start(); in front of it and ob_end_flush(); on the end. Replace "." by "," when you don't need to merge several parts, like in the above example above. Use ' instead of " to mark the start and end of something. This should improve the performance of yours scripts slightly and is applicable in almost every script.
Examples:
This is the same: (last is faster)
PHP:
echo "this"."this".$this;
echo 'this','this',$this;
This is the same: (last is faster)
PHP:
for($i=0;$i<500;$i++) {echo "something";}
ob_start(); for($i=0;$i<500;$i++) {echo 'something';}; ob_end_flush();