php-src/sapi/cli/tests/bug64544.phpt
Xinchen Hui 953f07503a Fixed bug #64544 (Valgrind warnings after using putenv)
The frozen_envion is needed, since if an item in environ is updated
(like the test script HOME one), invalid free still shows up
2013-03-29 23:42:50 +08:00

21 lines
305 B
PHP

--TEST--
Bug #64544 (Valgrind warnings after using putenv)
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == "WIN") {
die("skip non windows test");
}
?>
--FILE--
<?php
putenv("HOME=/tmp");
var_dump(getenv("HOME"));
putenv("FOO=BAR");
var_dump(getenv("FOO"));
?>
--EXPECTF--
string(4) "/tmp"
string(3) "BAR"