<?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>scriptNode &#187; news</title>
	<atom:link href="http://scriptnode.com/tag/news/feed/" rel="self" type="application/rss+xml" />
	<link>http://scriptnode.com</link>
	<description>Tips and tricks for web developers.</description>
	<lastBuildDate>Tue, 01 Sep 2009 18:46:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP to Use Backslash as Namespace Separator</title>
		<link>http://scriptnode.com/article/php-to-use-backslash-as-namespace-separator/</link>
		<comments>http://scriptnode.com/article/php-to-use-backslash-as-namespace-separator/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 21:23:52 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[code-style]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=235</guid>
		<description><![CDATA[
After much debate, the minds behind PHP have made an important decision. The good news is, PHP will support namespaces. The (arguably) bad news is, the namespace separator will be the backslash character.


Here&#8217;s a simple example of what this will look like:


$object_instance = new My\PEAR\Module(&#8217;myvar&#8217;);


PHP 5 already already has its criticisms. The developers looked at [...]]]></description>
			<content:encoded><![CDATA[<p>
After <a href="http://wiki.php.net/_media/rfc/php.ns.txt?id=rfc%3Anamespaceseparator&#038;cache=cache">much debate</a>, the minds behind <a href="http://php.net/">PHP</a> have made an important decision. The good news is, PHP will support namespaces. The (arguably) bad news is, <a href="http://news.php.net/php.internals/41374">the namespace separator will be the backslash character</a>.
</p>
<p>
Here&#8217;s a simple example of what this will look like:
</p>
<p><textarea class="php" cols="50" name="code" rows="10"><br />
$object_instance = new My\PEAR\Module(&#8217;myvar&#8217;);<br />
</textarea></p>
<p>
PHP 5 already already has <a href="http://www.tnx.nl/php5.html">its criticisms</a>. The developers looked at <a href="http://wiki.php.net/rfc/namespaceseparator">many different options</a>, including <code>**</code>, <code>^^</code>, <code>%%</code>, <code>:&gt;</code>, <code>:)</code> and <code>:::</code>, but eventually decided on <code>&#92;</code>, which is an odd decision, given that it doesn&#8217;t remotely resemble <a href="http://www.math.tu-berlin.de/polymake/index.html#perl/namespaces.html[3,3,0]">its</a> <a href="http://en.wikipedia.org/wiki/Namespace_identifier">cousins</a>. In fact, it most closely resembles <a href="http://en.wikipedia.org/wiki/MS-DOS">directories in MS-DOS</a> or <a href="http://en.wikipedia.org/wiki/Windows_Registry">other Windows features</a>.
</p>
<p>
The argument was also made that current operators such as  <code>::</code> or <code>-&gt;</code> could have been used, but they <a href="http://us2.php.net/manual/en/language.oop5.paamayim-nekudotayim.php">already had other duties</a>. The argument doesn&#8217;t go far, however, because PHP of course uses the backslash character for escaping.</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/php-to-use-backslash-as-namespace-separator/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
