In PHP, the class is nested and inherited. Class A is nested with Class B, and class B is inherited with class C. can it be implemented ?, Class is certainly not nested. he Said That nesting should mean instantiating a class ........ ===, What does nesting mean? Of course, it can be instantiated. it is not possible to define a class in a class ., No. why are you writing this? & Nbsp; do you want to implement this? Class nesting and inheritance in PHPcod PHP
A class B is nested in Class A, and class B is an inherited class C. can it be implemented?
------ Solution --------------------
Classes cannot be nested.
------ Solution --------------------
He said that nesting should mean instantiating a class ........ ===
------ Solution --------------------
What does nesting mean? Of course, it can be instantiated. it is not possible to define classes in a class.
------ Solution --------------------
No. why are you writing this?
Do you want to achieve this?
PHP code
Class C {public $ C = 'cname';} class B extends C {public $ B = 'bname';} class A {public $ B; function load () {$ this-> B = new B () ;}}$ A = new A (); $ A-> load (); echo $ A-> B-> C; echo $ A-> B;