Last active
April 29, 2018 21:07
-
-
Save Sama34/cb3fb4d0b9604b425c9abdfb38f80ce1 to your computer and use it in GitHub Desktop.
MyBB dump helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('IN_MYBB') or die(''); | |
function _dump_info() | |
{ | |
return array( | |
'name' => '_dump', | |
'author' => 'Omar G.', | |
'version' => '1.0', | |
'compatibility' => '1*' | |
); | |
} | |
function _dump() | |
{ | |
$args = func_get_args(); | |
echo '<pre>'; | |
var_dump($args); | |
echo '</pre>'; | |
exit; | |
} | |
function __dump($func) | |
{ | |
$f = new ReflectionFunction($func); | |
$result = array(); | |
foreach ($f->getParameters() as $param) | |
{ | |
$result[] = $param->name; | |
} | |
_dump($result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment