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-- Check that isDefaultValueConstant() does not leak --FILE-- <?php class Test { ..
Decoded Output download
--TEST--
Check that isDefaultValueConstant() does not leak
--FILE--
<?php
class Test {
public function method($param = [123]) {}
}
$rp = new ReflectionParameter(['Test', 'method'], 'param');
var_dump($rp->isDefaultValueAvailable());
var_dump($rp->isDefaultValueConstant());
var_dump($rp->getDefaultValue());
?>
--EXPECT--
bool(true)
bool(false)
array(1) {
[0]=>
int(123)
}
Did this file decode correctly?
Original Code
--TEST--
Check that isDefaultValueConstant() does not leak
--FILE--
<?php
class Test {
public function method($param = [123]) {}
}
$rp = new ReflectionParameter(['Test', 'method'], 'param');
var_dump($rp->isDefaultValueAvailable());
var_dump($rp->isDefaultValueConstant());
var_dump($rp->getDefaultValue());
?>
--EXPECT--
bool(true)
bool(false)
array(1) {
[0]=>
int(123)
}
Function Calls
None |
Stats
MD5 | 1fa6f4fc9f0b796e8fe437e752a19c48 |
Eval Count | 0 |
Decode Time | 65 ms |