PHPShell can not run interactive commands. Sudo requires the user to enter a password so it is interactive.

As to www-data, it is the user your web server is running as.

Kevin