xref: /PHP-8.0/ext/filter/tests/bug52209.phpt (revision f8d79582)
1--TEST--
2Bug #52209 (INPUT_ENV returns NULL for set variables (CLI))
3--SKIPIF--
4<?php
5/* This test makes no sense on windows as an empty variable
6   would never show up in the "set" list. Which means, it's
7   always undefined in PHP. */
8if(substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows");
9if (!extension_loaded("filter")) die ('skip filter extension not loaded');
10if (empty($_ENV['PWD'])) die('skip PWD is empty');
11?>
12--INI--
13variables_order=GPCSE
14--FILE--
15<?php
16    var_dump(filter_input(INPUT_ENV, 'PWD'));
17?>
18--EXPECTF--
19string(%d) "%s"
20