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-- Test chdir() function : error conditions - Non-existent directory --SKIPIF-- <?ph..
Decoded Output download
--TEST--
Test chdir() function : error conditions - Non-existent directory
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die("skip Valid only on Windows");
}
?>
--FILE--
<?php
/*
* Pass a directory that does not exist as $directory to chdir() to test behaviour
*/
echo "*** Testing chdir() : error conditions ***
";
$directory = __FILE__ . '/idonotexist';
var_dump(chdir($directory));
?>
--EXPECTF--
*** Testing chdir() : error conditions ***
Warning: chdir(): %s (errno %d) in %s on line %d
bool(false)
Did this file decode correctly?
Original Code
--TEST--
Test chdir() function : error conditions - Non-existent directory
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die("skip Valid only on Windows");
}
?>
--FILE--
<?php
/*
* Pass a directory that does not exist as $directory to chdir() to test behaviour
*/
echo "*** Testing chdir() : error conditions ***\n";
$directory = __FILE__ . '/idonotexist';
var_dump(chdir($directory));
?>
--EXPECTF--
*** Testing chdir() : error conditions ***
Warning: chdir(): %s (errno %d) in %s on line %d
bool(false)
Function Calls
None |
Stats
MD5 | c7e34803cb3a0c32d385469d0465f645 |
Eval Count | 0 |
Decode Time | 70 ms |