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 stat() function: error conditions --SKIPIF-- <?php if (substr(PHP_OS, 0, 3) ..
Decoded Output download
--TEST--
Test stat() function: error conditions
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?>
--FILE--
<?php
$file_path = __DIR__;
$arr = array(__FILE__);
echo "
*** Testing stat() for error conditions ***
";
var_dump( stat("$file_path/temp.tmp") ); // non existing file
var_dump( stat("$file_path/temp/") ); // non existing dir
var_dump( stat(22) ); // scalar argument
echo "Done
";
?>
--EXPECTF--
*** Testing stat() for error conditions ***
Warning: stat(): stat failed for %s in %s on line %d
bool(false)
Warning: stat(): stat failed for %s in %s on line %d
bool(false)
Warning: stat(): stat failed for 22 in %s on line %d
bool(false)
Done
Did this file decode correctly?
Original Code
--TEST--
Test stat() function: error conditions
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?>
--FILE--
<?php
$file_path = __DIR__;
$arr = array(__FILE__);
echo "\n*** Testing stat() for error conditions ***\n";
var_dump( stat("$file_path/temp.tmp") ); // non existing file
var_dump( stat("$file_path/temp/") ); // non existing dir
var_dump( stat(22) ); // scalar argument
echo "Done\n";
?>
--EXPECTF--
*** Testing stat() for error conditions ***
Warning: stat(): stat failed for %s in %s on line %d
bool(false)
Warning: stat(): stat failed for %s in %s on line %d
bool(false)
Warning: stat(): stat failed for 22 in %s on line %d
bool(false)
Done
Function Calls
None |
Stats
MD5 | 763fc1e28b4831727e14f37d4538c7c0 |
Eval Count | 0 |
Decode Time | 87 ms |