3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $obj = (object) [ 'a' => function(){ return 1; }, 'b' => (object) [ 'ba' => function(){ return 2; }, 'bb' => (object) [ 'bba' => function(){ return 3; } ] ] ]; $obj->a(); $obj->b->ba(); $obj->b->bb->bba();
based on 98GtP
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method stdClass::a() in /in/SaKdt:12 Stack trace: #0 {main} thrown in /in/SaKdt on line 12
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Call to undefined method stdClass::a() in /in/SaKdt on line 12
Process exited with code 255.