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 #70156 (Segfault in zend_find_alias_name) --FILE-- <?php trait T1 { prote..

Decoded Output download

--TEST--
Bug #70156 (Segfault in zend_find_alias_name)
--FILE--
<?php
trait T1 {
    protected function foo1()
    {
        $this->bar();
    }
}

trait T2 {
    protected function foo2()
    {
        debug_print_backtrace();
    }
}

class dummy {
    use T1 {
        foo1 as private;
    }
    use T2 {
        foo2 as bar;
    }
    public function __construct()
    {
        $this->foo1();
    }
}

new dummy();
?>
--EXPECTF--
#0 %s(%d): dummy->bar()
#1 %s(%d): dummy->foo1()
#2 %s(%d): dummy->__construct()

Did this file decode correctly?

Original Code

--TEST--
Bug #70156 (Segfault in zend_find_alias_name)
--FILE--
<?php
trait T1 {
    protected function foo1()
    {
        $this->bar();
    }
}

trait T2 {
    protected function foo2()
    {
        debug_print_backtrace();
    }
}

class dummy {
    use T1 {
        foo1 as private;
    }
    use T2 {
        foo2 as bar;
    }
    public function __construct()
    {
        $this->foo1();
    }
}

new dummy();
?>
--EXPECTF--
#0 %s(%d): dummy->bar()
#1 %s(%d): dummy->foo1()
#2 %s(%d): dummy->__construct()

Function Calls

None

Variables

None

Stats

MD5 a098d809ec7eee06dc9b4e1d91e134fa
Eval Count 0
Decode Time 78 ms