<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP: The @ Operator</title>
	<atom:link href="http://thesmithfam.org/blog/2006/05/07/php-the-operator/feed/" rel="self" type="application/rss+xml" />
	<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/</link>
	<description>Your blog is probably better than mine.</description>
	<lastBuildDate>Sun, 05 Feb 2012 05:18:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Sejanus</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-160635</link>
		<dc:creator>Sejanus</dc:creator>
		<pubDate>Fri, 16 Dec 2011 09:25:01 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-160635</guid>
		<description>the correct way is to write your own custom error handler (which is rather easy and faster than it sounds) and choose what and when errors to show, what to log (if needed), etc. @ always and I mean always is bad. Wait till you need to debug the code which is already in production with @ all over the place.</description>
		<content:encoded><![CDATA[<p>the correct way is to write your own custom error handler (which is rather easy and faster than it sounds) and choose what and when errors to show, what to log (if needed), etc. @ always and I mean always is bad. Wait till you need to debug the code which is already in production with @ all over the place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey Lempert</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-115655</link>
		<dc:creator>Sergey Lempert</dc:creator>
		<pubDate>Fri, 26 Nov 2010 14:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-115655</guid>
		<description>Thank you! I always used to set error_reporting level to zero to suppress errors.</description>
		<content:encoded><![CDATA[<p>Thank you! I always used to set error_reporting level to zero to suppress errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-102174</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 14 May 2010 15:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-102174</guid>
		<description>SWiT: I would probably suggest that you are making a feature out of a bug by using @ to suppress all output with require_once(). A better approach would probably be to:

1. Refactor the code in SomeScriptWithEchos.php to be more of a library that *can* produce output when asked, but doesn&#039;t *have* to produce output.

2. Or use output buffering to suppress output instead:
http://php.net/manual/en/book.outcontrol.php</description>
		<content:encoded><![CDATA[<p>SWiT: I would probably suggest that you are making a feature out of a bug by using @ to suppress all output with require_once(). A better approach would probably be to:</p>
<p>1. Refactor the code in SomeScriptWithEchos.php to be more of a library that *can* produce output when asked, but doesn&#8217;t *have* to produce output.</p>
<p>2. Or use output buffering to suppress output instead:<br />
<a href="http://php.net/manual/en/book.outcontrol.php" rel="nofollow">http://php.net/manual/en/book.outcontrol.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SWiT</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-102171</link>
		<dc:creator>SWiT</dc:creator>
		<pubDate>Fri, 14 May 2010 14:43:04 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-102171</guid>
		<description>I&#039;m not sure if this is a legitimate use of `@` but I&#039;ve used it with PHP 5.2.6 and WAMP in a @require_once(&quot;SomeScriptWithEchos.php&quot;); statement to keep the echos from writing to the output buffer and stopping a redirect from happening.   That way I can run &quot;SomeScriptWithEchos.php&quot; directly for maintainence or include it in automated scripts inside out application.   

I will note it didn&#039;t work on our production site running php 5.2.(&gt;6) and I had to comment out the echo statements in &quot;SomeScriptWithEchos.php&quot;.  I am curious if this is an ok use or am I making a feature out of a bug?</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure if this is a legitimate use of `@` but I&#8217;ve used it with PHP 5.2.6 and WAMP in a @require_once(&#8220;SomeScriptWithEchos.php&#8221;); statement to keep the echos from writing to the output buffer and stopping a redirect from happening.   That way I can run &#8220;SomeScriptWithEchos.php&#8221; directly for maintainence or include it in automated scripts inside out application.   </p>
<p>I will note it didn&#8217;t work on our production site running php 5.2.(&gt;6) and I had to comment out the echo statements in &#8220;SomeScriptWithEchos.php&#8221;.  I am curious if this is an ok use or am I making a feature out of a bug?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alpha Monk</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-101663</link>
		<dc:creator>Alpha Monk</dc:creator>
		<pubDate>Wed, 28 Apr 2010 15:33:06 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-101663</guid>
		<description>I came here only seeking information about PHP @ operator and learned a bit about error handling in here too.

This is a very good article.</description>
		<content:encoded><![CDATA[<p>I came here only seeking information about PHP @ operator and learned a bit about error handling in here too.</p>
<p>This is a very good article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mostafa</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-99822</link>
		<dc:creator>Mostafa</dc:creator>
		<pubDate>Sat, 13 Mar 2010 17:43:46 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-99822</guid>
		<description>Very helpful
I didnt find @ operator explanation easily.</description>
		<content:encoded><![CDATA[<p>Very helpful<br />
I didnt find @ operator explanation easily.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rejani</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-99269</link>
		<dc:creator>rejani</dc:creator>
		<pubDate>Tue, 02 Mar 2010 10:46:19 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-99269</guid>
		<description>Thanks for the crystal clear explanation of @.
It is very useful.</description>
		<content:encoded><![CDATA[<p>Thanks for the crystal clear explanation of @.<br />
It is very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-82527</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 16 Jul 2009 21:35:43 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-82527</guid>
		<description>@unknown (ironic huh)

you can always do this:
$str =@ $_POST[&quot;something&quot;];</description>
		<content:encoded><![CDATA[<p>@unknown (ironic huh)</p>
<p>you can always do this:<br />
$str =@ $_POST["something"];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-79957</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 12 Jun 2009 19:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-79957</guid>
		<description>The &amp; operator is used when you pass a variable to a function to tell PHP to pass it by reference instead of passing it by value (copy on write), like this:

$var = &quot;foo&quot;;
some_fiunction(&amp;$var);

Unlike C++, in PHP the caller chooses when to pass by value and when to pass by reference. In C++, the function writer indicates this with the &amp; character in the function signature.</description>
		<content:encoded><![CDATA[<p>The &#038; operator is used when you pass a variable to a function to tell PHP to pass it by reference instead of passing it by value (copy on write), like this:</p>
<p>$var = &#8220;foo&#8221;;<br />
some_fiunction(&#038;$var);</p>
<p>Unlike C++, in PHP the caller chooses when to pass by value and when to pass by reference. In C++, the function writer indicates this with the &#038; character in the function signature.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: name</title>
		<link>http://thesmithfam.org/blog/2006/05/07/php-the-operator/comment-page-1/#comment-79954</link>
		<dc:creator>name</dc:creator>
		<pubDate>Fri, 12 Jun 2009 19:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=19#comment-79954</guid>
		<description>thank you. what is the &amp; operator? i saw this in php manual in array section.</description>
		<content:encoded><![CDATA[<p>thank you. what is the &amp; operator? i saw this in php manual in array section.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

