4 ms·
You cant ask your users (if you are designing framework) to write such a mess. Take an mvc framework for example where named url segments take place in variable
by maxpert 14y ago
You cant ask your users (if you are designing framework) to write such a mess. Take an mvc framework for example where named url segments take place in variables automatically.
- ericingram 14y agoThe 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?