Fix php5.5 implementation