The FSM package provides a simple class that implements a Finite State Machine. PR: ports/76043 Submitted by: Antônio Carlos Venâncio Júnior <antonio@php.net>