Added erase command and php functions