3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { var $_x = 0; function set($x) { $this->_x = $x; } function disp() { var_dump($this); } } $x = new X; $a[0] = $x; $x->set(2); $a[0]->disp(); $x->disp();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BB58f
function name:  (null)
number of ops:  14
compiled vars:  !0 = $x, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        ASSIGN_DIM                                               !1, 0
          4        OP_DATA                                                  !0
   11     5        INIT_METHOD_CALL                                         !0, 'set'
          6        SEND_VAL_EX                                              2
          7        DO_FCALL                                      0          
   12     8        FETCH_DIM_R                                      ~7      !1, 0
          9        INIT_METHOD_CALL                                         ~7, 'disp'
         10        DO_FCALL                                      0          
   13    11        INIT_METHOD_CALL                                         !0, 'disp'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class X:
Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BB58f
function name:  set
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               '_x'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function set

Function disp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BB58f
function name:  disp
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

End of function disp

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.1 ms | 1395 KiB | 15 Q