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 declare(strict_types=1); /* * This file is part of PHPUnit. * * (c) Sebastian Ber..
Decoded Output download
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TestFixture;
use function restore_error_handler;
use function restore_exception_handler;
use function set_error_handler;
use function set_exception_handler;
use PHPUnit\Framework\TestCase;
class Issue5592Test extends TestCase
{
public function testAddedAndRemovedErrorHandler(): void
{
set_error_handler(static fn () => false);
restore_error_handler();
$this->assertTrue(true);
}
public function testAddedErrorHandler(): void
{
set_error_handler(static fn () => false);
$this->assertTrue(false);
}
public function testRemovedErrorHandler(): void
{
restore_error_handler();
$this->assertTrue(false);
}
public function testAddedAndRemovedExceptionHandler(): void
{
set_exception_handler(static fn () => null);
restore_exception_handler();
$this->assertTrue(true);
}
public function testAddedExceptionHandler(): void
{
set_exception_handler(static fn () => null);
$this->assertTrue(false);
}
public function testRemovedExceptionHandler(): void
{
restore_exception_handler();
$this->assertTrue(false);
}
}
?>
Did this file decode correctly?
Original Code
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TestFixture;
use function restore_error_handler;
use function restore_exception_handler;
use function set_error_handler;
use function set_exception_handler;
use PHPUnit\Framework\TestCase;
class Issue5592Test extends TestCase
{
public function testAddedAndRemovedErrorHandler(): void
{
set_error_handler(static fn () => false);
restore_error_handler();
$this->assertTrue(true);
}
public function testAddedErrorHandler(): void
{
set_error_handler(static fn () => false);
$this->assertTrue(false);
}
public function testRemovedErrorHandler(): void
{
restore_error_handler();
$this->assertTrue(false);
}
public function testAddedAndRemovedExceptionHandler(): void
{
set_exception_handler(static fn () => null);
restore_exception_handler();
$this->assertTrue(true);
}
public function testAddedExceptionHandler(): void
{
set_exception_handler(static fn () => null);
$this->assertTrue(false);
}
public function testRemovedExceptionHandler(): void
{
restore_exception_handler();
$this->assertTrue(false);
}
}
Function Calls
None |
Stats
MD5 | 2eef05ff811f5e7ba3af1c80b19940e6 |
Eval Count | 0 |
Decode Time | 78 ms |