Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Tests\Traits; trait GeneratesTestDirectory { /** * @var string ..
Decoded Output download
<?php
namespace Tests\Traits;
trait GeneratesTestDirectory
{
/**
* @var string
*/
protected static $testDirectory;
/**
* Create a tests directory and make it the current directory.
*
* @return void
*/
public static function setUpBeforeClass(): void
{
self::$testDirectory = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('homestead_', true);
mkdir(self::$testDirectory);
chdir(self::$testDirectory);
}
/**
* Delete the tests directory.
*
* @return void
*/
public static function tearDownAfterClass(): void
{
rmdir(self::$testDirectory);
}
/**
* Delete all the files inside the tests directory.
*
* @return void
*/
public function tearDown(): void
{
exec('rm -rf '.self::$testDirectory.DIRECTORY_SEPARATOR.'*');
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Tests\Traits;
trait GeneratesTestDirectory
{
/**
* @var string
*/
protected static $testDirectory;
/**
* Create a tests directory and make it the current directory.
*
* @return void
*/
public static function setUpBeforeClass(): void
{
self::$testDirectory = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('homestead_', true);
mkdir(self::$testDirectory);
chdir(self::$testDirectory);
}
/**
* Delete the tests directory.
*
* @return void
*/
public static function tearDownAfterClass(): void
{
rmdir(self::$testDirectory);
}
/**
* Delete all the files inside the tests directory.
*
* @return void
*/
public function tearDown(): void
{
exec('rm -rf '.self::$testDirectory.DIRECTORY_SEPARATOR.'*');
}
}
Function Calls
None |
Stats
MD5 | a612a0b5980aa5b07eaa183e14dc6248 |
Eval Count | 0 |
Decode Time | 102 ms |