A hypothetical question for you all to chew on...
I recently answered another question on SO where a PHP script was segfaulting, and it reminded me of something I ha
I could be totally wrong about this since my testing was fairly brief. It seems that Php will only seg fault if it runs out of memory (and presumably tries to access an invalid address). If the memory limit is set and low enough, you will get an out of memory error beforehand. Otherwise, the code seg faults and is handled by the OS.
Can't say whether this is a bug or not, but the script should probably not be allowed to get out of control like this.
See the script below. Behavior is practically identical regardless of options. Without a memory limit, it also slows my computer down severely before it's killed.
= 0; $x++) {
print_memory_usage();
$a[] = $x;
}
break;
default:
die("Usage: " . __FILE__ . " <-i-or--r> [-l]\n");
break;
}
?>