- var_dump: documentation ( source)
- array_filter: documentation ( source)
<?php
$x = array(
1,
2,
true,
null, //will be removed
'', //will be removed
false, //will be removed
0, //will be removed
array(), //will be removed
'finish'
);
function xxx($a)
{
var_dump('hola');
return array_filter($a);
}
foreach(xxx($x) as $b) {
echo $b;
}