update php5 variables into functions