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-- ReflectionFunction::getNamespaceName() --FILE-- <?php namespace A\B; function foo..
Decoded Output download
--TEST--
ReflectionFunction::getNamespaceName()
--FILE--
<?php
namespace A\B;
function foo() {}
$function = new \ReflectionFunction('sort');
var_dump($function->inNamespace());
var_dump($function->getName());
var_dump($function->getNamespaceName());
var_dump($function->getShortName());
$function = new \ReflectionFunction('A\B\foo');
var_dump($function->inNamespace());
var_dump($function->getName());
var_dump($function->getNamespaceName());
var_dump($function->getShortName());
?>
--EXPECT--
bool(false)
string(4) "sort"
string(0) ""
string(4) "sort"
bool(true)
string(7) "A\Boo"
string(3) "A\B"
string(3) "foo"
Did this file decode correctly?
Original Code
--TEST--
ReflectionFunction::getNamespaceName()
--FILE--
<?php
namespace A\B;
function foo() {}
$function = new \ReflectionFunction('sort');
var_dump($function->inNamespace());
var_dump($function->getName());
var_dump($function->getNamespaceName());
var_dump($function->getShortName());
$function = new \ReflectionFunction('A\\B\\foo');
var_dump($function->inNamespace());
var_dump($function->getName());
var_dump($function->getNamespaceName());
var_dump($function->getShortName());
?>
--EXPECT--
bool(false)
string(4) "sort"
string(0) ""
string(4) "sort"
bool(true)
string(7) "A\B\foo"
string(3) "A\B"
string(3) "foo"
Function Calls
None |
Stats
MD5 | 19970b7b16b795b18d450a6b7da8edd8 |
Eval Count | 0 |
Decode Time | 80 ms |