<?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: Lesser known PHP functions – call_user_func_array</title>
	<atom:link href="http://www.unemployeddeveloper.com/239_lesser-known-php-functions-call_user_func_array/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unemployeddeveloper.com/239_lesser-known-php-functions-call_user_func_array/</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 16:11:34 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Shawn</title>
		<link>http://www.unemployeddeveloper.com/239_lesser-known-php-functions-call_user_func_array/comment-page-1/#comment-71</link>
		<dc:creator>Shawn</dc:creator>
		<pubDate>Mon, 09 Nov 2009 21:53:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.unemployeddeveloper.com/?p=239#comment-71</guid>
		<description>@Rune - I completely forgot about the public static declaration. In my code(s) I have it set up both ways that you describe. Good catch, I&#039;ll change it in the writeup.</description>
		<content:encoded><![CDATA[<p>@Rune &#8211; I completely forgot about the public static declaration. In my code(s) I have it set up both ways that you describe. Good catch, I&#8217;ll change it in the writeup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rune Kaagaard</title>
		<link>http://www.unemployeddeveloper.com/239_lesser-known-php-functions-call_user_func_array/comment-page-1/#comment-70</link>
		<dc:creator>Rune Kaagaard</dc:creator>
		<pubDate>Mon, 09 Nov 2009 20:19:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.unemployeddeveloper.com/?p=239#comment-70</guid>
		<description>Display of last example is broken.</description>
		<content:encoded><![CDATA[<p>Display of last example is broken.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rune Kaagaard</title>
		<link>http://www.unemployeddeveloper.com/239_lesser-known-php-functions-call_user_func_array/comment-page-1/#comment-69</link>
		<dc:creator>Rune Kaagaard</dc:creator>
		<pubDate>Mon, 09 Nov 2009 20:17:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.unemployeddeveloper.com/?p=239#comment-69</guid>
		<description>Variants of this would include call_user_func and using variable variables. Examples (maybe weird blog syntax comming up):

call_user_func(&#039;foo&#039;, 42, 43, 44);
$var = &#039;foo&#039;;
$$var(42,43,44);

and the evil (VERY SLOW):
eval(&#039;foo(42,43,44);&#039;);

I believe your class example would give a E_STRICT error because you are trying to call a non static function in a static content.

So you should declare the function like this:
public static function foo($bar, $baz).

If what you want is to use a class instance the syntax is:

foz  $baz, $bar&quot;; 
    } 
} 

$about = new about();
call_user_func_array( array($about, &#039;foo&#039;), array(&#039;three&#039;, &#039;four&#039;));

Take Care!</description>
		<content:encoded><![CDATA[<p>Variants of this would include call_user_func and using variable variables. Examples (maybe weird blog syntax comming up):</p>
<p>call_user_func(&#8217;foo&#8217;, 42, 43, 44);<br />
$var = &#8216;foo&#8217;;<br />
$$var(42,43,44);</p>
<p>and the evil (VERY SLOW):<br />
eval(&#8217;foo(42,43,44);&#8217;);</p>
<p>I believe your class example would give a E_STRICT error because you are trying to call a non static function in a static content.</p>
<p>So you should declare the function like this:<br />
public static function foo($bar, $baz).</p>
<p>If what you want is to use a class instance the syntax is:</p>
<p>foz  $baz, $bar&#8221;;<br />
    }<br />
} </p>
<p>$about = new about();<br />
call_user_func_array( array($about, &#8216;foo&#8217;), array(&#8217;three&#8217;, &#8216;four&#8217;));</p>
<p>Take Care!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Webby Scripts Lesser known PHP functions – call_user_func_array &#124; Unemployed &#8230;</title>
		<link>http://www.unemployeddeveloper.com/239_lesser-known-php-functions-call_user_func_array/comment-page-1/#comment-67</link>
		<dc:creator>Webby Scripts Lesser known PHP functions – call_user_func_array &#124; Unemployed &#8230;</dc:creator>
		<pubDate>Mon, 09 Nov 2009 09:31:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.unemployeddeveloper.com/?p=239#comment-67</guid>
		<description>[...] Lesser known PHP functions – call_user_func_array &#124; Unemployed &#8230; [...]</description>
		<content:encoded><![CDATA[<p>[...] Lesser known PHP functions – call_user_func_array | Unemployed &#8230; [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
