PHP 5.3 namespace bug?


<?php
namespace BuggySpace;

class Example
{
  	private $collection = 'Category';
  	
	public function works()
	{
		return new Category('works');
		//aka new \BuggySpace\Category
	}
	
	public function produceFatal()
	{
		return new $this->collection('like a charm');
		//$this->collection is "Category" so then evaluate as new Category(); and search for "Category" class in "BuggySpace" namespace!
	}
}

//class "Category" is in "BuggySpace" namespace!! ;)
class Category
{
	public function __construct($msg)
	{
		echo $msg . ' ';
	}
}

$letsPlay = new Example();
$letsPlay->works();
$letsPlay->produceFatal();

/**

reproduced by insekticid at exploit.cz
tested on Windows 8 Dev with PHP 5.3.8 and 5.3.9RC4 as FCGI

**/

Expected result is: "works like a charm ", but you get "works Fatal error: Class 'Category' not found in php-namespace-bug.php on line 16"