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-- Bug #32160 (copying a file into itself leads to data loss) --FILE-- <?php $path =..

Decoded Output download

--TEST--
Bug #32160 (copying a file into itself leads to data loss)
--FILE--
<?php
$path = __DIR__ . "/bug32160.txt";
var_dump(copy($path, $path));
chdir(__DIR__);
var_dump(copy($path, "bug32160.txt"));
var_dump(copy("bug32160.txt", "bug32160.txt"));
?>
--EXPECT--
bool(false)
bool(false)
bool(false)

Did this file decode correctly?

Original Code

--TEST--
Bug #32160 (copying a file into itself leads to data loss)
--FILE--
<?php
$path = __DIR__ . "/bug32160.txt";
var_dump(copy($path, $path));
chdir(__DIR__);
var_dump(copy($path, "bug32160.txt"));
var_dump(copy("bug32160.txt", "bug32160.txt"));
?>
--EXPECT--
bool(false)
bool(false)
bool(false)

Function Calls

None

Variables

None

Stats

MD5 176e9fe3ed6945a511b2f242c5523677
Eval Count 0
Decode Time 117 ms