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-- SPL: Spl File Info test getLinkTarget --CREDITS-- Nataniel McHugh [email protected]..
Decoded Output download
--TEST--
SPL: Spl File Info test getLinkTarget
--CREDITS--
Nataniel McHugh [email protected]
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip this test not for Windows platforms");
?>
--FILE--
<?php
$link = __DIR__ . '/test_link';
symlink(__FILE__, $link );
$fileInfo = new SplFileInfo($link);
if ($fileInfo->isLink()) {
echo $fileInfo->getLinkTarget() == __FILE__ ? 'same' : 'different',PHP_EOL;
}
var_dump(unlink($link));
?>
--EXPECT--
same
bool(true)
Did this file decode correctly?
Original Code
--TEST--
SPL: Spl File Info test getLinkTarget
--CREDITS--
Nataniel McHugh [email protected]
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip this test not for Windows platforms");
?>
--FILE--
<?php
$link = __DIR__ . '/test_link';
symlink(__FILE__, $link );
$fileInfo = new SplFileInfo($link);
if ($fileInfo->isLink()) {
echo $fileInfo->getLinkTarget() == __FILE__ ? 'same' : 'different',PHP_EOL;
}
var_dump(unlink($link));
?>
--EXPECT--
same
bool(true)
Function Calls
None |
Stats
MD5 | 87ea47503397b4609c26e084ed05f6fa |
Eval Count | 0 |
Decode Time | 101 ms |