fork download
  1. <?php
  2.  
  3. $obj = (object) [
  4. 'a' => function(){ return 1; },
  5. 'b' => (object) [
  6. 'ba' => function(){ return 2; },
  7. 'bb' => (object) [
  8. 'bba' => function(){ return 3; }
  9. ]
  10. ]
  11. ];
  12.  
  13. call_user_func($obj->a);
  14. call_user_func($obj->b->ba);
  15. call_user_func($obj->b->bb->bba);
  16.  
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Standard output is empty