I know that it's possible to add new HTTP auth credentials through this shell script:
htpasswd -c .htpasswd testing
Is it possible to achieve the same with a PHP script? I know I could use a regular PHP auth system, but that's not what I'm looking for.