I feel so confused.
PHP Code
* Foo * CB * Tango * CC * Foo * CD * * what the hell?! :) */?>
Is it covered, or what? Why output so ah, do not understand Ah, listen to chaos ah.
------Solution--------------------
What's it called? Trouble!
To be tired and tired
------Solution--------------------
If you don't understand, forget it, it doesn't matter.
------Solution--------------------
discuss
What's it called? Make dumplings for trouble!
To be tired and tired
------Solution--------------------
It might be clearer.
PHP Code
Class ca{/** * Test property for using direct default value * Test properties using immediate defaults */protected static $item = ' Foo '; /** * Test property for using indirect default value * Test properties using indirect defaults */protected static $other = ' CA '; public static Function method () {print __method__. ' ' . __class__. ':: $item = '. Self:: $item. " \ r \ n "; Print __method__. ' ' . __class__. ':: $otfer = '. Self:: $other. " \ r \ n "; The public static function Setother ($val) {self:: $other = $val;//Set A value of this scope. }}class CB extends ca{/** * Test Property with redefined default value * Redefined defaults Test Properties */protected stat IC $item = ' Bar '; public static function Setother ($val) {self:: $other = $val; }}class CC extends ca{/** * Test Property with redefined default value * Redefined defaults Test Properties */protected stat IC $item = ' Tango '; public static Function method () {print __method__. ' ' . __class__. ':: $item = '. Self:: $item. " \ r \ n "; Print __method__. ' ' . __class__. ':: $otfer = '. Self:: $other. " \ r \ n "; }/** * Now we drop redeclaring the Setother () method, use CA with ' self:: ' Just for fun. */}class CD extends ca{/** * Test Property with redefined default value * Redefined defaults Test Properties */protected STA Tic $item = ' Foxtrot '; /** * Now we drop redeclaring all methods to complete this issue. * Now, we give up all methods of re-declaring to complete this problem */}cb::setother (' CB '); It ' s Cb::method ()!cb::method (); It ' s Ca::method ()!cc::setother (' CC '); It ' s Ca::method ()!cc::method (); It ' s Cc::method ()!cd::setother (' CD '); It ' s Ca::method ()!cd::method (); It ' s Ca::method ()!