Hi,
Certainly an alternative way to write clean code is to use symfony or
simply to always use your own function to hide the ugliness of this:

        function getArrayElem($ary, $elm, $def=null) {
                return (isset($ary[$elm])) ? $ary[$elm] : $def;
        }

Of course if you use symfony, you're simply passing the use of both
this construct:
  (isset($ary[$elm])) ? $ary[$elm] : null
and this one:
  @$ary[$elm]
to someone else's code :-)

Try:
error_reporting( E_ALL | E_STRICT | E_NOTICE );

Neither E_ALL (warnings and errors only) or E_STRICT (forward
compatibility) turns on notices.  The construct being used isn't
deprecated, nor is it an error :-)

-Craig


On Sep 16, 7:43 pm, Sid Bachtiar <[email protected]> wrote:
> Sure, I'm not arguing for the user of @ either. I use Symfony, I don't
> even use $_GET anymore. I prefer $something =
> $request->getParameter('something');
>
> By the way, I tried the following and it did not raise any error (php 5.26)
>
> <?php
> error_reporting( E_ALL | E_STRICT );
> $something = @$_GET['something'];
>

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to