import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-general_functions / php_uname_variation1.php
blobe34c958d0fe8797c62a2b3125b6345fc9053353c
1 <?php
2 /* Prototype: string php_uname ([ string $mode ] )
3 * Description: Returns information about the operating system PHP is running on
4 */
6 echo "*** Testing php_uname() - usage variations\n";
7 // Prevent notices about undefines variables
8 error_reporting(E_ALL & ~E_NOTICE);
10 $unset_var = 10;
11 unset ($unset_var);
13 class fooClass {
14 function __toString() {
15 return "m";
19 $values = array(
21 // int data
22 "0" => 0,
23 "1" => 1,
24 "12345" => 12345,
25 "-2345" => -2345,
27 // float data
28 "10.5" => 10.5,
29 "-10.5" => -10.5,
30 "10.1234567e10" => 10.1234567e10,
31 "10.7654321E-10" => 10.7654321E-10,
32 ".5" => .5,
34 // null data
35 "NULL" => NULL,
36 "null" => null,
38 // boolean data
39 "true" => true,
40 "false" => false,
41 "TRUE" => TRUE,
42 "FALSE" => FALSE,
44 // empty data
45 "\"\"" => "",
46 "''" => '',
48 // object data
49 "new fooClass()" => new fooClass(),
51 // undefined data
52 "undefined var" => $undefined_var,
54 // unset data
55 "unset var" => $unset_var,
58 // loop through each element of the array for data
60 foreach($values as $key => $value) {
61 echo "-- Iterator $key --\n";
62 var_dump( php_uname($value) );
66 ===DONE===