<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Webmaster-Source &#187; function</title>
	<atom:link href="https://www.webmaster-source.com/tag/function/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.webmaster-source.com</link>
	<description>Useful Resources For Webmasters</description>
	<lastBuildDate>Thu, 24 Aug 2017 02:01:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>Variable-length Argument Lists in PHP with func_get_args()</title>
		<link>https://www.webmaster-source.com/2011/03/14/variable-length-argument-lists-in-php-with-func_get_args/</link>
		<comments>https://www.webmaster-source.com/2011/03/14/variable-length-argument-lists-in-php-with-func_get_args/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 11:33:18 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3941</guid>
		<description><![CDATA[Have you ever wanted to write a function in PHP that would accept a varying amount of arguments rather than requiring ones arbitrarily hard-coded? I can&#8217;t think of a reason why you would off the top of my head, but I know I&#8217;ve wished for such an ability before. There&#8217;s a PHP function called func_get_args() [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Have you ever wanted to write a function in PHP that would accept a varying amount of arguments rather than requiring ones arbitrarily hard-coded? I can&#8217;t think of a reason <em>why</em> you would off the top of my head, but I know I&#8217;ve wished for such an ability before. There&#8217;s a PHP function called <a href="http://php.net/manual/en/function.func-get-args.php">func_get_args()</a> that will let you do that with minimal effort.</p>
<pre class="brush: php; title: ; notranslate">
function myFunc() {

$args = func_get_args();

foreach ($args as $key =&gt; $value) {
echo &quot;Argument {$key}: {$value} &lt;br /&gt;&quot;;
}

}
</pre>
<p>You can call <code>myFunc()</code> with no arguments or like <code>myFunc('hello world', 'lorem ipsum', 'dolor sit amet')</code>.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2011/03/14/variable-length-argument-lists-in-php-with-func_get_args/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/


Served from: www.webmaster-source.com @ 2026-06-11 05:17:27 by W3 Total Cache
-->