3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Bar { private string $go; } class Foo { use Bar; function test() { $this->go = 'test'; echo $this->go; } } $foo = new Foo(); $foo->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/89I7A
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'foo'
   16     1        NEW                                              $1      'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   17     4        INIT_METHOD_CALL                                         !0, 'test'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Bar: [no user functions]
Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/89I7A
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN_OBJ                                               'go'
          1        OP_DATA                                                  'test'
   12     2        FETCH_OBJ_R                                      ~1      'go'
          3        ECHO                                                     ~1
   13     4      > RETURN                                                   null

End of function test

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.74 ms | 996 KiB | 13 Q