Skip to content

Instantly share code, notes, and snippets.

@Sama34
Last active April 29, 2018 21:07
Show Gist options
  • Save Sama34/cb3fb4d0b9604b425c9abdfb38f80ce1 to your computer and use it in GitHub Desktop.
Save Sama34/cb3fb4d0b9604b425c9abdfb38f80ce1 to your computer and use it in GitHub Desktop.
MyBB dump helper
<?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