update php API, fix 'Notice' reporting