-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use php_uname() instead of PHP_OS #3
Comments
This makes perfect sense. |
I just submitted the pull request, a review would be welcome. |
I ended up doing my own package with a complete different logic: https://github.com/drupol/phposinfo It's also using php_uname(). |
@derUli out of interest do you have any examples where you can into this? |
I agree this makes sense. It's probably rare that people cross compile PHP, but I'm sure it happens. It's simply not right to be using PHP_OS when a more accurate and reliable alternative (php_uname) exists. The PHP documentation for each of those members makes it pretty clear that this is best practice. |
@WyriHaximus I don't have any example under the hand, but I guess that some platforms (RaspBerry, etc etc) are using cross compiled binaries. |
does anyone have a list of possible |
Please note that PHP_OS returns the Operating System where the PHP executable was built.
While in most cases this is equally to the runtime OS, this returns an invalid value if the php interpreter was cross built on another Operating System.
http://php.net/manual/de/function.php-uname.php
The text was updated successfully, but these errors were encountered: