Update codes with old PHP syntax