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 #39884 (ReflectionParameter::getClass() throws exception for type hint self) ..

Decoded Output download

--TEST--
Bug #39884 (ReflectionParameter::getClass() throws exception for type hint self)
--FILE--
<?php
class stubParamTest
{
    function paramTest(self $param)
    {
        // nothing to do
    }
}
$test1 = new stubParamTest();
$test2 = new stubParamTest();
$test1->paramTest($test2);
$refParam = new ReflectionParameter(array('stubParamTest', 'paramTest'), 'param');
var_dump($refParam->getClass());
?>
--EXPECTF--
Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d
object(ReflectionClass)#4 (1) {
  ["name"]=>
  string(13) "stubParamTest"
}

Did this file decode correctly?

Original Code

--TEST--
Bug #39884 (ReflectionParameter::getClass() throws exception for type hint self)
--FILE--
<?php
class stubParamTest
{
    function paramTest(self $param)
    {
        // nothing to do
    }
}
$test1 = new stubParamTest();
$test2 = new stubParamTest();
$test1->paramTest($test2);
$refParam = new ReflectionParameter(array('stubParamTest', 'paramTest'), 'param');
var_dump($refParam->getClass());
?>
--EXPECTF--
Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d
object(ReflectionClass)#4 (1) {
  ["name"]=>
  string(13) "stubParamTest"
}

Function Calls

None

Variables

None

Stats

MD5 9dca0b921ffe546fb4129a7348c51652
Eval Count 0
Decode Time 102 ms