Welcome Guest, Not a member yet? Register   Sign In
Introducing Fire: Similar to Cake’s Bake and RoR’s script/generate
#12

[eluser]Michael Wales[/eluser]
From the PHP documentation:
Quote:php_uname() will return the OS of the system currently running PHP.
The constant PHP_OS will return the OS that did the build of PHP being run.

There is some debate as to whether or not PHP_OS returns the build machine or does in fact return a cleaner string representing the OS currently running PHP.

I just did a test on this machine (WinXP, Service Pack 2) and the return was:
Quote:Windows NT (computer name) 5.1 build 2600
WINNT

for the following code:
Code:
<?php
  echo php_uname() . "\n";
  echo PHP_OS;
?>

I seriously doubt Zend is building PHP on Windows boxes, so I'd say the PHP_OS constant is a pretty good choice.


Messages In This Thread
Introducing Fire: Similar to Cake’s Bake and RoR’s script/generate - by El Forum - 08-06-2007, 06:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB