improved php52 check script