Upgrade php method