3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bla = ''; public function __construct(){ $this->bla = "fooooo"; } public function __invoke($arg){ $this->bla = $arg + $this->bla; } } Class Foo2 extends Foo { } $blubb = new Foo2(); $blubb("bla"); var_dump();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeeqo
function name:  (null)
number of ops:  9
compiled vars:  !0 = $blubb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Foo2'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_VAL_EX                                              'bla'
          5        DO_FCALL                                      0          
   23     6        INIT_FCALL                                               'var_dump'
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeeqo
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN_OBJ                                               'bla'
          1        OP_DATA                                                  'fooooo'
    9     2      > RETURN                                                   null

End of function __construct

Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeeqo
function name:  __invoke
number of ops:  6
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        FETCH_OBJ_R                                      ~2      'bla'
          2        ADD                                              ~3      !0, ~2
          3        ASSIGN_OBJ                                               'bla'
          4        OP_DATA                                                  ~3
   13     5      > RETURN                                                   null

End of function __invoke

End of class Foo.

Class Foo2:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeeqo
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN_OBJ                                               'bla'
          1        OP_DATA                                                  'fooooo'
    9     2      > RETURN                                                   null

End of function __construct

Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oeeqo
function name:  __invoke
number of ops:  6
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        FETCH_OBJ_R                                      ~2      'bla'
          2        ADD                                              ~3      !0, ~2
          3        ASSIGN_OBJ                                               'bla'
          4        OP_DATA                                                  ~3
   13     5      > RETURN                                                   null

End of function __invoke

End of class Foo2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.76 ms | 1404 KiB | 16 Q