PHP implementation of TOGVM