fix deprecated code

it was old function of PHP