3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { use Bar; public string $id = 'foo'; } trait Bar { public function someMethod() { var_dump($this->id); } } (new Foo)->someMethod();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rJRjZ
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'foo'
   18     1        NEW                                                  $0      'Foo'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, 'someMethod'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class Foo: [no user functions]
Class Bar:
Function somemethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rJRjZ
function name:  someMethod
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                                   'var_dump'
          1        FETCH_OBJ_R                                          ~0      'id'
          2        SEND_VAL                                                     ~0
          3        DO_ICALL                                                     
   15     4      > RETURN                                                       null

End of function somemethod

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.85 ms | 1482 KiB | 14 Q