Furthermore, on shared hosts memory_limit is not always the limiting factor. This function will always be a rough guess and will not be able to catch all problems.