Created php function