Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- putenv() basic tests --FILE-- <?php $var_name="SUCHVARSHOULDNOTEXIST"; var_dump..
Decoded Output download
--TEST--
putenv() basic tests
--FILE--
<?php
$var_name="SUCHVARSHOULDNOTEXIST";
var_dump(getenv($var_name));
var_dump(putenv($var_name."=value"));
var_dump(getenv($var_name));
var_dump(putenv($var_name."="));
var_dump(getenv($var_name));
var_dump(putenv($var_name));
var_dump(getenv($var_name));
try {
putenv("=123");
} catch (ValueError $exception) {
echo $exception->getMessage() . "
";
}
try {
putenv("");
} catch (ValueError $exception) {
echo $exception->getMessage() . "
";
}
echo "Done
";
?>
--EXPECT--
bool(false)
bool(true)
string(5) "value"
bool(true)
string(0) ""
bool(true)
bool(false)
putenv(): Argument #1 ($assignment) must have a valid syntax
putenv(): Argument #1 ($assignment) must have a valid syntax
Done
Did this file decode correctly?
Original Code
--TEST--
putenv() basic tests
--FILE--
<?php
$var_name="SUCHVARSHOULDNOTEXIST";
var_dump(getenv($var_name));
var_dump(putenv($var_name."=value"));
var_dump(getenv($var_name));
var_dump(putenv($var_name."="));
var_dump(getenv($var_name));
var_dump(putenv($var_name));
var_dump(getenv($var_name));
try {
putenv("=123");
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
putenv("");
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
echo "Done\n";
?>
--EXPECT--
bool(false)
bool(true)
string(5) "value"
bool(true)
string(0) ""
bool(true)
bool(false)
putenv(): Argument #1 ($assignment) must have a valid syntax
putenv(): Argument #1 ($assignment) must have a valid syntax
Done
Function Calls
getenv | 1 |
Stats
MD5 | 6b596171965b06b89cf313dbdde0ddd0 |
Eval Count | 0 |
Decode Time | 82 ms |