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-- ReflectionParameter::__toString() should display default values for internal func..

Decoded Output download

--TEST--
ReflectionParameter::__toString() should display default values for internal functions as well
--FILE--
<?php
$class = new ReflectionClass('DateTime');
$method = $class->getMethod('setTime');

foreach ($method->getParameters() as $k => $parameter) {
    echo $parameter . "
";
}

echo "----------
";

$class = new ReflectionClass('DateTimeZone');
$method = $class->getMethod('listIdentifiers');

foreach ($method->getParameters() as $parameter) {
    echo $parameter . "
";
}
?>
--EXPECT--
Parameter #0 [ <required> int $hour ]
Parameter #1 [ <required> int $minute ]
Parameter #2 [ <optional> int $second = 0 ]
Parameter #3 [ <optional> int $microsecond = 0 ]
----------
Parameter #0 [ <optional> int $timezoneGroup = DateTimeZone::ALL ]
Parameter #1 [ <optional> ?string $countryCode = null ]

Did this file decode correctly?

Original Code

--TEST--
ReflectionParameter::__toString() should display default values for internal functions as well
--FILE--
<?php
$class = new ReflectionClass('DateTime');
$method = $class->getMethod('setTime');

foreach ($method->getParameters() as $k => $parameter) {
    echo $parameter . "\n";
}

echo "----------\n";

$class = new ReflectionClass('DateTimeZone');
$method = $class->getMethod('listIdentifiers');

foreach ($method->getParameters() as $parameter) {
    echo $parameter . "\n";
}
?>
--EXPECT--
Parameter #0 [ <required> int $hour ]
Parameter #1 [ <required> int $minute ]
Parameter #2 [ <optional> int $second = 0 ]
Parameter #3 [ <optional> int $microsecond = 0 ]
----------
Parameter #0 [ <optional> int $timezoneGroup = DateTimeZone::ALL ]
Parameter #1 [ <optional> ?string $countryCode = null ]

Function Calls

None

Variables

None

Stats

MD5 803caaaad8bd54638cb921006591871e
Eval Count 0
Decode Time 77 ms