This has got to be one of the strangest errors I have error come across jsut because the exact same code on two other systems work fine.

Let me explain my set up and how and where it works. First of all I am using zend framework and the error is thrown in the Zend/View/Abstract class on line 300.

Windows system running PHP 5.3.3 - Works Fine Here.
Linux Centos 5.5 system running PHP 5.3.3 - Works Fine here.
Linux Centos 5.5 system running PHP 5.3.6 - This system gives me the fatal error.

PHP - Fatal error: Cannot access property started with '\0'

Looking at the setup I first thought that this had to be a bug in PHP but I am not so sure. I first had PHP 5.3.5 installed and upgraded to 5.3.6 but that didnt help.

The code throwing the error should work also so I am completely confused as to why I am getting the error on this system and not the other two.

Code that is throwing the error is :

```
$this->$key = $val;

```

Located in the following method:

```
public function __set($key, $val)
{
        if ('_' != substr($key, 0, 1)) {
            $this->$key = $val;
            return;
        }

        require_once 'Zend/View/Exception.php';
        $e = new Zend_View_Exception('Setting private or protected class members is not allowed');
        $e->setView($this);
        throw $e;
}

```

Any help would be greatly appreciated.

I did some further debugging and it isn't one of my variables causing the error. I found that when the $key variable was set to Zend\_View\_useViewStream the fatal error is thrown, so I vardumped it before and after it was string trimmed. 

```
KEY string(25) "Zend_View_useViewStream" 
TRIMMED string(24) "Zend_View_useViewStream" 

```

As you can see the string lenght is 1 character longer when the variable is not trimmed but they seem identical to me?? I guess the nul-byte [ "\0" (ASCII 0 (0x00)), the NUL-byte. ] is being stripped with trim but why is it being added on this system and not the others?