The file owner and the process owner of a PHP script are different. The file owner owns the PHP script but the process owner is the user the script is running as, thus determining its capabilities / privileges in the file system.

Here's how you can find the file owner of a PHP file. And to get the process user that the PHP script is being run as:

PHP Code:
$processUser posix_getpwuid(posix_geteuid());
Which would give something like this:

PHP Code:
name] => www-data
[passwd] => x
[uid] => 33
[gid] => 33
[gecos] => www-data
[dir] => /var/www
[shell] => /bin/sh

And $processUser['name'] is the process owner which is usually the user Apache web server is run as, such as nobody or www-data.