If I understood the question correctly: you need to get the name of the current user authorized in the domain PC operating system.
If the PHP application is installed on IIS, then this is done via the AUTH_USER variable. Checked - works on IE, Chrome and FireFox. Here is my verification code:
<?php echo $_SERVER['AUTH_USER']; ?>
As a result, I get the username in the form: MYDOMAIN\user.name
There is only one BUT! In order for this solution to really work, you will have to abandon another type of authentication on the site (that is, only through AD).
Here's what you need to do in IIS: in the authentication settings (Authentication), enable (Enable) "Windows Authentication" and necessarily (!) Disable anonymous access (Anonymous authentication).
In IE and Chrome will work immediately, and FireFox will need to first put this add-on and put the site into trusted: https://addons.mozilla.org/ru/firefox/addon/integrated-auth-for-firefox/