Have you tried exporting a field group with tab fields in it? To generate tab fields in PHP you need to create the field array that looks like an exported tab field. It’s really the same as any other field, you just have to make sure you supply the right values.
Exactly what is it that’s confusing you?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users