--TEST--
Unsetting and recreating protected properties.
--FILE--
<?php
class {
    protected 
$p 'test';
    function 
unsetProtected() {
        unset(
$this->p);        
    }
    function 
setProtected() {
        
$this->'changed';        
    }
}

class 
extends {
    function 
setP() {
        
$this->'changed in D';
    }
}

$d = new D;
echo 
"Unset and recreate a protected property from property's declaring class scope:\n";
$d->unsetProtected();
$d->setProtected();
var_dump($d);

echo 
"\nUnset and recreate a protected property from subclass:\n";
$d = new D;
$d->unsetProtected();
$d->setP();
var_dump($d);

echo 
"\nUnset a protected property, and attempt to recreate it outside of scope (expected failure):\n";
$d->unsetProtected();
$d->'this will fail';
var_dump($d);
?>
--EXPECTF--
Unset and recreate a protected property from property's declaring class scope:
object(D)#%d (1) {
  [%u|b%"p":protected]=>
  %unicode|string%(7) "changed"
}

Unset and recreate a protected property from subclass:
object(D)#%d (1) {
  [%u|b%"p":protected]=>
  %unicode|string%(12) "changed in D"
}

Unset a protected property, and attempt to recreate it outside of scope (expected failure):

Fatal error: Cannot access protected property %s::$p in %s on line 32