1--TEST-- 2Inherited static properties can be separated from their reference set. 3--FILE-- 4<?php 5class C { public static $p = 'original'; } 6class D extends C { } 7class E extends D { } 8 9echo "\nInherited static properties refer to the same value across classes:\n"; 10var_dump(C::$p, D::$p, E::$p); 11 12echo "\nChanging one changes all the others:\n"; 13D::$p = 'changed.all'; 14var_dump(C::$p, D::$p, E::$p); 15 16echo "\nBut because this is implemented using PHP references, the reference set can easily be split:\n"; 17$ref = 'changed.one'; 18D::$p =& $ref; 19var_dump(C::$p, D::$p, E::$p); 20?> 21==Done== 22--EXPECTF-- 23Inherited static properties refer to the same value across classes: 24%unicode|string%(8) "original" 25%unicode|string%(8) "original" 26%unicode|string%(8) "original" 27 28Changing one changes all the others: 29%unicode|string%(11) "changed.all" 30%unicode|string%(11) "changed.all" 31%unicode|string%(11) "changed.all" 32 33But because this is implemented using PHP references, the reference set can easily be split: 34%unicode|string%(11) "changed.all" 35%unicode|string%(11) "changed.one" 36%unicode|string%(11) "changed.all" 37==Done==