3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function test() { return new stdClass; } } $b = new stdClass; $b->c = new C; $b->c->test()->d = 'waa';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gIXdR
function name:  (null)
number of ops:  14
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        NEW                                              $5      'C'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'c'
          6        OP_DATA                                                  $5
   14     7        FETCH_OBJ_R                                      ~7      !0, 'c'
          8        INIT_METHOD_CALL                                         ~7, 'test'
          9        DO_FCALL                                      0  $8      
         10        SEPARATE                                         $8      $8
         11        ASSIGN_OBJ                                               $8, 'd'
         12        OP_DATA                                                  'waa'
         13      > RETURN                                                   1

Class C:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gIXdR
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $0      'stdClass'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    8     3*     > RETURN                                                   null

End of function test

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.16 ms | 1394 KiB | 13 Q