On Mon, Jan 5, 2009 at 01:16, Christian Hammers <c...@lathspell.de> wrote: > Hello > > Am Sun, 4 Jan 2009 20:28:13 +0100 > schrieb "Hannes Magnusson" <hannes.magnus...@gmail.com>: > >> On Sun, Jan 4, 2009 at 19:53, Christian Hammers <c...@lathspell.de> >> wrote: >> > Hello >> > >> > I've incorporated all your suggestions and added a .cvsignore as >> > well as some "choice=opt" markers to the optional function >> > parameters. >> > >> > The new diffs are attached. >> >> @ in examples is a big no no. > > You mean suppressing error messages is bad style? The context here was: > > // Cannot convert a domain name to ASCII that contains non-ASCII chars > // but already starts with "xn--" > $ascii = @idn_to_ascii("xn--".chr(0xC3).chr(0xA4), $errorcode); > if ($ascii === false) { > printf("Detected error %d: %s\n", $errorcode,idn_strerror($errorcode)); > } > > The problem was that idn_to_ascii() prints E_USER_WARNING messages if > errors occur. I found not other way to check the outcome of this
That's fine. If you are showcasing "failures" then add a comment above it like // Will throw E_WARNING blabla.. and optionally remember people to not have display_errors turned on in production environments. PHP.net documentations should not advocate using @ in no way what so ever. -Hannes