PHP scripts will run as either:
- The user running Apache as determined by the
User directive in your Apache configuration (usually apache or nobody) if you are using mod_php - The user running PHP-FPM if you are using
php-fpm
So the user a PHP script will execute as will vary. So it's up to you to set the owner and group of /var/www/html (or wherever your DocumentRoot is) accordingly.
Furthermore, you may not wish for your PHP application to be able to write (or overwrite) files in your DocumentRoot at all, as this could allow a visitor to a compromised or insecure PHP web application to gain remote code execution privileges. So it's your responsibility to decide whether or not your PHP application is trustworthy enough to allow it to write to files that Apache can serve over the web or even execute.
PHP will almost never (and should never!) be run as root for similar reasons to those mentioned above.