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-- Test ReflectionFunction::getClosure() function : basic functionality --FILE-- <?p..

Decoded Output download

*** Testing ReflectionFunction::getClosure() : basic functionality ***

Did this file decode correctly?

Original Code

--TEST--
Test ReflectionFunction::getClosure() function : basic functionality
--FILE--
<?php
echo "*** Testing ReflectionFunction::getClosure() : basic functionality ***\n";

function foo()
{
    var_dump( "Inside foo function" );
}

function bar( $arg )
{
    var_dump( "Arg is " . $arg );
}

$func = new ReflectionFunction( 'foo' );
$closure = $func->getClosure();
$closure();

$func = new ReflectionFunction( 'bar' );
$closure = $func->getClosure();
$closure( 'succeeded' );

?>
--EXPECT--
*** Testing ReflectionFunction::getClosure() : basic functionality ***
string(19) "Inside foo function"
string(16) "Arg is succeeded"

Function Calls

None

Variables

None

Stats

MD5 f3503a43ba3d2f05e28e1f3944565df6
Eval Count 0
Decode Time 110 ms