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 #73989 (PHP 7.1 Segfaults within Symfony test suite) --FILE-- <?php class Cyc..

Decoded Output download

--TEST--
Bug #73989 (PHP 7.1 Segfaults within Symfony test suite)
--FILE--
<?php
class Cycle
{
    private $thing;

    public function __construct()
    {
        $obj = $this;
        $this->thing = function() use($obj) {};
    }

    public function __destruct()
    {
        ($this->thing)();
    }

}

for ($i = 0; $i < 10000; ++$i) {
    $obj = new Cycle();
}
echo "OK
";
?>
--EXPECT--
OK

Did this file decode correctly?

Original Code

--TEST--
Bug #73989 (PHP 7.1 Segfaults within Symfony test suite)
--FILE--
<?php
class Cycle
{
    private $thing;

    public function __construct()
    {
        $obj = $this;
        $this->thing = function() use($obj) {};
    }

    public function __destruct()
    {
        ($this->thing)();
    }

}

for ($i = 0; $i < 10000; ++$i) {
    $obj = new Cycle();
}
echo "OK\n";
?>
--EXPECT--
OK

Function Calls

None

Variables

None

Stats

MD5 aa88cae9e044f03843f1a6c64cab71b5
Eval Count 0
Decode Time 93 ms