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 #37816 (ReflectionProperty does not throw exception when accessing protected ..

Decoded Output download

--TEST--
Bug #37816 (ReflectionProperty does not throw exception when accessing protected attribute)
--FILE--
<?php

class TestClass
{
    protected $p = 2;
}

$o = new TestClass;

$r = new ReflectionProperty($o, 'p');

var_dump($r->getValue($o));

?>
--EXPECT--
int(2)

Did this file decode correctly?

Original Code

--TEST--
Bug #37816 (ReflectionProperty does not throw exception when accessing protected attribute)
--FILE--
<?php

class TestClass
{
    protected $p = 2;
}

$o = new TestClass;

$r = new ReflectionProperty($o, 'p');

var_dump($r->getValue($o));

?>
--EXPECT--
int(2)

Function Calls

None

Variables

None

Stats

MD5 996fd3399176e1f31951c3a3ff70f1df
Eval Count 0
Decode Time 84 ms