in constructor
name: Root.
parent: .
done root x
in constructor
name: Child1.
Fatal error: Uncaught Error: Object of class MyNode could not be converted to string in /in/T7Os5:12
Stack trace:
#0 /in/T7Os5(18): MyNode->__construct('Child1', Object(MyNode))
#1 {main}
thrown in /in/T7Os5 on line 12
Process exited with code 255.