4 ms·
Lazy coder here : foreach(['a' => closureA, 'b' => closureB, 'c' => closureC] as $name => $toApply) { $myObject->${convertNameToFieldName($name)} = $
by arkh 8y ago
Lazy coder here :
foreach(['a' => closureA, 'b' => closureB, 'c' => closureC] as $name => $toApply) {
$myObject->${convertNameToFieldName($name)} = $toApply($something);
}
- Piskvorrr 8y agoToo clever by half - a textbook example. This is, in essence, write-only code.