Hacker News new | past | comments | ask | show | jobs | submit login

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().



Agreed on the `messier' part.

How's extract($arr, EXTR_IF_EXISTS) not validating enough?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: