<?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: Prepared statement errors with PHP 5.3 and mysqli. call_user_func_array returns null. Type error?</title>
	<atom:link href="http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null/feed" rel="self" type="application/rss+xml" />
	<link>http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null</link>
	<description>A knowledge base for simple (and beyond) web applications development</description>
	<lastBuildDate>Fri, 23 Jul 2010 14:03:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nate Admin</title>
		<link>http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null/comment-page-1#comment-2805</link>
		<dc:creator>Nate Admin</dc:creator>
		<pubDate>Mon, 12 Apr 2010 03:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=144#comment-2805</guid>
		<description>Very nice! Thanks Chris. I remember running into reference issues in later php versions, things where functions required arguments that were by reference, and any fresh or deep-copy objects would show warnings or errors. Something like that. It is annoying how the ref usage is changing a bit. But for the sake of progress in php I can live with it.

Oh man, I just looked at the bug. Spot on. Nice find! Using the zend framework is exactly where I ran into these errors.</description>
		<content:encoded><![CDATA[<p>Very nice! Thanks Chris. I remember running into reference issues in later php versions, things where functions required arguments that were by reference, and any fresh or deep-copy objects would show warnings or errors. Something like that. It is annoying how the ref usage is changing a bit. But for the sake of progress in php I can live with it.</p>
<p>Oh man, I just looked at the bug. Spot on. Nice find! Using the zend framework is exactly where I ran into these errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null/comment-page-1#comment-2702</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 29 Mar 2010 10:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=144#comment-2702</guid>
		<description>me again. it seems to be a general PHP 5.3 issue: http://bugs.php.net/43568</description>
		<content:encoded><![CDATA[<p>me again. it seems to be a general PHP 5.3 issue: <a href="http://bugs.php.net/43568" rel="nofollow">http://bugs.php.net/43568</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null/comment-page-1#comment-2701</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 29 Mar 2010 10:18:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=144#comment-2701</guid>
		<description>got a workaround. all bindings MUST be references to some other thing. i solve this like so:

			//$arr = array_merge(array(&amp;$statement, &amp;$fmt), &amp;$args); // stopped working in 5.3
			$arr = array();
			$arr[] = $statement;
			$arr[] = $fmt;
			foreach($args as $k =&gt; $v)
				$arr[] = &amp;$args[$k]; // *ref* is REQUIRED; array_merge doesn&#039;t do that</description>
		<content:encoded><![CDATA[<p>got a workaround. all bindings MUST be references to some other thing. i solve this like so:</p>
<p>			//$arr = array_merge(array(&amp;$statement, &amp;$fmt), &amp;$args); // stopped working in 5.3<br />
			$arr = array();<br />
			$arr[] = $statement;<br />
			$arr[] = $fmt;<br />
			foreach($args as $k =&gt; $v)<br />
				$arr[] = &amp;$args[$k]; // *ref* is REQUIRED; array_merge doesn&#8217;t do that</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate Admin</title>
		<link>http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null/comment-page-1#comment-2295</link>
		<dc:creator>Nate Admin</dc:creator>
		<pubDate>Wed, 20 Jan 2010 06:22:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=144#comment-2295</guid>
		<description>Unfortunately I never found a work-around to use a variable number of params. Which is still frustrating considering mysqli is the improved mysql library, and 5.3 is the later and improved version of php. You would think more people would have this issue. I wonder if it is a variable length function problem. Maybe you can&#039;t use call_user_func_array for functions with varable length parameters as a result of a bug or some misunderstanding on my part. 

Let me know if you find the solution so I can get link to it and get an unresolved problem off the google search results.

I ended up recompiling php for snow leopard to be 5.2.8, since I had to recompile it anyways for an image library. And at work we switched to ruby on rails for a backend, so I don&#039;t think I&#039;ll be solving this one.</description>
		<content:encoded><![CDATA[<p>Unfortunately I never found a work-around to use a variable number of params. Which is still frustrating considering mysqli is the improved mysql library, and 5.3 is the later and improved version of php. You would think more people would have this issue. I wonder if it is a variable length function problem. Maybe you can&#8217;t use call_user_func_array for functions with varable length parameters as a result of a bug or some misunderstanding on my part. </p>
<p>Let me know if you find the solution so I can get link to it and get an unresolved problem off the google search results.</p>
<p>I ended up recompiling php for snow leopard to be 5.2.8, since I had to recompile it anyways for an image library. And at work we switched to ruby on rails for a backend, so I don&#8217;t think I&#8217;ll be solving this one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil</title>
		<link>http://www.n8williams.com/devblog/php/prepared-statement-errors-with-php-5-3-and-mysqli-call_user_func_array-returns-null/comment-page-1#comment-2284</link>
		<dc:creator>Emil</dc:creator>
		<pubDate>Sun, 17 Jan 2010 22:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=144#comment-2284</guid>
		<description>Hi, 

Great post, I recently ran into this same bug, while trying to make a call to mysqli_stmt_bind_param using call_user_func_array. Have you found any solution that will still allow to bind a variable number of parameters?

Thanks, 

Emil</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Great post, I recently ran into this same bug, while trying to make a call to mysqli_stmt_bind_param using call_user_func_array. Have you found any solution that will still allow to bind a variable number of parameters?</p>
<p>Thanks, </p>
<p>Emil</p>
]]></content:encoded>
	</item>
</channel>
</rss>
