Re: warning message to hide

From: Date: Wed, 18 Apr 2007 17:51:47 +0000
Subject: Re: warning message to hide
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-253216@lists.php.net to get a copy of this message
Tijnema ! wrote: > On 4/18/07, Roman Neuhauser <neuhauser@sigpipe.cz> wrote: >> # tijnema@gmail.com / 2007-04-18 07:55:05 +0100: >> > On 4/17/07, Richard Lynch <ceo@l-i-e.com> wrote: >> > >On Sat, April 14, 2007 12:12 pm, Tijnema ! wrote: >> > >>> try putting an @ sign before this line. something like this: >> > >>> @$conn = pg_connect($conn_string); >> > >> >> > >> According to the manual: >> > >> ¬Ùy*Gõ¤‡ô{ >> > >> \&¶®http://www.php.net/manual/en/language.operators.errorcontrol.php >> > >> the @ should be placed before the function, so like this: >> > >> $conn = @pg_connect($conn_string); >> > > >> > >Actually, the manual explicitly documents the @ operator as being >> > >valid in front of any EXPRESSION. >> >> > Ok, you're right, both are valid. But i think it's better to use it >> > before the function name. (like all examples in the manual do ). >> > >> > Else you might end up with code like this: >> > my_function(@$var); >> > >> > Which will result in a parse error... >> >> Any expression means any expression. >> >> roman@dagan ~ 1007:0 > php -r 'var_dump($foo);' >> PHP Notice: Undefined variable: foo in Command line code on line 1 >> NULL >> roman@dagan ~ 1008:0 > php -r 'var_dump(@$foo);' >> NULL > > Hmm, this is what i get: > ~# php -r 'var_dump($foo);' > NULL > ~# php -r 'var_dump(@$foo);' > NULL > > > PHP6 snapshot from a month ago. a, php6 is akin to pre-alpha, no saying what state it is in atm. b, try turning on error_reporting to E_ALL > > Tijnema >> -- >> How many Vietnam vets does it take to screw in a light bulb? >> You don't know, man. You don't KNOW. >> Cause you weren't THERE. >> http://bash.org/?255991 >> >

« previous php.general (#253216) next »