update php api, return null if not_found