Discussion on: PHP Functions every beginner should know.

feichinger profile image

Some additions:
Avoid exec if possible! A great many use-cases have dedicated native wrappers for system calls (e.g. mkdir). Very rarely will you be forced to actually execute shell commands, and when you are, you'll have to struggle with the output of that shell call as well.

file_get_contents for HTTP requests is also best discouraged. It's great for local disk, but ext-curl provides a much better wrapper around curl.