- var_dump: documentation ( source)
<?php
class Foo {
public function handle($users)
{
var_dump($this->pushUsersToQueue($users));
}
private function allUsersPushed($users)
{
return count($users) <= 0;
}
private function pushUsersToQueue($users)
{
if (! $this->allUsersPushed($users))
{
return false;
}
var_dump("run the foreach");
}
}
$a = new Foo;
$b = new Foo;
$a->handle([1,2,3,4]);
print "\n--------------------------------\n";
$b->handle([]);