Added a snippet for my preferred way of doing php functions