- var_dump: documentation ( source)
- range: documentation ( source)
<?php
class Shit {
public static function getShits() {
return array(
new Shit,
new Shit,
new Shit
);
}
public function getTird() {
return 'sucks';
}
public function getPoopies() {
return range(0,10);
}
}
$shits = array();
foreach(Shit::getShits() as $shit) {
$shits[] = array(
'tird' => $shit->getTird(),
'fuck' => call_user_func(function() use($shit) {
$poopies = array();
foreach($shit->getPoppies as $poopie) {
$poppies[$poopie] = 'sucks';
}
return $poopies;
})
);
}
var_dump($shits);