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::isVariadic() --FILE-- <?php function test1($args) {} functi..
Decoded Output download
--TEST--
ReflectionParameter::isVariadic()
--FILE--
<?php
function test1($args) {}
function test2(...$args) {}
function test3($arg, ...$args) {}
$r1 = new ReflectionFunction('test1');
$r2 = new ReflectionFunction('test2');
$r3 = new ReflectionFunction('test3');
var_dump($r1->getParameters()[0]->isVariadic());
var_dump($r2->getParameters()[0]->isVariadic());
var_dump($r3->getParameters()[0]->isVariadic());
var_dump($r3->getParameters()[1]->isVariadic());
?>
--EXPECT--
bool(false)
bool(true)
bool(false)
bool(true)
Did this file decode correctly?
Original Code
--TEST--
ReflectionParameter::isVariadic()
--FILE--
<?php
function test1($args) {}
function test2(...$args) {}
function test3($arg, ...$args) {}
$r1 = new ReflectionFunction('test1');
$r2 = new ReflectionFunction('test2');
$r3 = new ReflectionFunction('test3');
var_dump($r1->getParameters()[0]->isVariadic());
var_dump($r2->getParameters()[0]->isVariadic());
var_dump($r3->getParameters()[0]->isVariadic());
var_dump($r3->getParameters()[1]->isVariadic());
?>
--EXPECT--
bool(false)
bool(true)
bool(false)
bool(true)
Function Calls
None |
Stats
MD5 | 0aab6775881728a471c4350dbba37caf |
Eval Count | 0 |
Decode Time | 107 ms |