News for hackers. Stuff that matters.
Re:PHP: A fractal of bad design by Zarel on Tuesday April 10, 2012 @10:17PM (#3825610)
> I've written PHP for about 3 years and I've never once used the @ to suppress errors.

Is it so wrong to use @? I've always used (@$_REQUEST['foo'] === 'bar') as a shorter way of writing (isset($_REQUEST['foo']) && $_REQUEST['foo'] === 'bar') - I'm curious if there's a problem with that approach.

Re:PHP: A fractal of bad design by wvenable on Tuesday April 10, 2012 @11:51PM (#3825838)
Actually yes because the error gets generated anyway (and that is slow) and then it's just suppressed at the last moment.

You'd probably be better off creating a function to do what you want succinctly rather than using the suppression operator.

Re:PHP: A fractal of bad design by brendoncrawford on Thursday April 12, 2012 @05:59PM (#3834388)
You be using array_key_exists instead.