> Is there any preference for:
> 
> $val = isset($arr['key']) ? $arr['key'] : null;

This is preferred - it's actually doing something correct.

> vs:
> 
> $val = @$arr['key'];

This is a hack, which causes an error, which you're then suppressing

Marcus and I discussed a shortcut for the first example at the last Montreal
PHP Conference, but I don't think it's been implemented yet.

H


_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to