- var_dump: documentation ( source)
- extract: documentation ( source)
- compact: documentation ( source)
<?php
function foo()
{
$bar = 'herro';
$baz = 'strrev';
return compact('bar', 'baz');
}
function hello(array $params)
{
extract($params);
var_dump($bar, $baz); // yes, this is happening...
}
function hi(array $params)
{
list($meh, $hem) = $params;
var_dump($meh, $hem);
}
$foo = foo();
hello($foo);
hi($foo);