PHP AIS Encoder Decoder