superior statemachine library for php