Deal with changes of tokens in php 5.5