Use occ in admin scripts - occ API?


I would like to add all users to a default group.
I’d write a script that uses occ to query users and groups, and occ to add users to groups.

A PHP script that is calling the PHP program occ is a bit indirect.
Is there an occ API that could be used from within PHP?