2 ms·
The OP solution looked messier to me honestly. We already use the pattern above in JavaScript quite successfully. I'd rather see the above implementation with a
by ericingram 14y ago
The OP solution looked messier to me honestly. We already use the pattern above in JavaScript quite successfully. I'd rather see the above implementation with a simple validator in place of extract().
- dexen 14y agoAgreed on the `messier' part. How's extract($arr, EXTR_IF_EXISTS) not validating enough?