Some examples on how to implement php code for various functions