{ use C; const FOO = 'bar'; const HELLO = 'World'; public $a = 'aa'; public $b = 'bb'; public static $d = 'dd'; private $c = 'cc'; public function foo() { return 'bar'; } } $fp = fopen(__FILE__, "r"); $a = array('first' => $fp, 'last' => new Bar(), 'null_var' => NULL, 'float' => pi(), 'bool' => true, ' leading_space' => 6 * 8, 'trailing_space ' => 'grapes', 'middle space' => 'Mt. Rushmore', 'phones' => array(5036541278, 8714077831, 'x253'), 'long_str' => "This is a really long string full of a\n bunch of crap that should eventually wrap. There once was a man from New Mexico...", 'empty_arr' => array(), 'func_str' => 'preg_replace', 'address' => array('street' => '123 Fake Street', 'city' => 'Portland', 'state' => 'Maine'), 'unixtime' => 1231241234, 'microtime' => microtime(1), 'datetime' => new DateTime(), 'func' => function ($arg) { vaR_dump($arg); }); $a['last']->a = 'zz'; $a['last']->new_property = 'new'; // basic call D::ump(array('likes', 'kittens', 'and', 'dogs')); /* * Pass an instance of D\DumpSettings as the final argument to add Flags and a Title * D::S() is syntatic sugar to quickly get a DumpSettings object * Available Flags are: * D::OB turns on output buffering to capture the output and returns it (InvalidArgumentException thrown if used with D::KILL) * D::KILL kills execution of PHP after printing the output (InvalidArgumentException thrown if used with D::OB) * D::EXPAND expands everything by default */ $str = D::ump(['foo' => 'bar'], D::S(D::OB, 'D::OB Flag')); print '<p>this should be before the output</p>';
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) { $cep = $request->getAttribute('cep', null); vaR_dump(get_class_methods($request)); return $next($request, $response); }