1--TEST--
2putenv() basic tests
3--FILE--
4<?php
5
6$var_name="SUCHVARSHOULDNOTEXIST";
7
8var_dump(getenv($var_name));
9var_dump(putenv($var_name."=value"));
10var_dump(getenv($var_name));
11
12var_dump(putenv($var_name."="));
13var_dump(getenv($var_name));
14
15var_dump(putenv($var_name));
16var_dump(getenv($var_name));
17
18var_dump(putenv("=123"));
19var_dump(putenv(""));
20
21echo "Done\n";
22?>
23--EXPECTF--
24bool(false)
25bool(true)
26string(5) "value"
27bool(true)
28string(0) ""
29bool(true)
30bool(false)
31
32Warning: putenv(): Invalid parameter syntax in %s on line %d
33bool(false)
34
35Warning: putenv(): Invalid parameter syntax in %s on line %d
36bool(false)
37Done
38