On Sep 16, 9:20 pm, craiganz <[email protected]> wrote: > The situation is the same, a single typo (too when it should have been > foo), such as: > $value = (isset($_GET['too'])) ? $_GET['foo'] : null; > or: > $value = @$_GET['too']; > > has exactly the same effect. There is no warning message that you > made the typo, and $value is always null.
No it's not the same effect. The second line hides the typo, the first exposes the error when $_GET['foo'] is not set. > If we have to gratuitously code around them, then something > is very, very wrong. A single ternary operator is hardly gratuitous. --~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] -~----------~----~----~----~------~----~------~--~---
