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(); $b = null; var_dump(intval(isset($b)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VmXGv
function name:  (null)
number of ops:  20
compiled vars:  !0 = $x, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   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                                      ~8      !1, 0
          9        INIT_METHOD_CALL                                         ~8, 'disp'
         10        DO_FCALL                                      0          
   13    11        INIT_METHOD_CALL                                         !0, 'disp'
         12        DO_FCALL                                      0          
   16    13        ASSIGN                                                   !2, null
   17    14        INIT_FCALL                                               'var_dump'
         15        ISSET_ISEMPTY_CV                                 ~12     !2
         16        CAST                                          4  ~13     ~12
         17        SEND_VAL                                                 ~13
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class X:
Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VmXGv
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/VmXGv
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:
168.24 ms | 1400 KiB | 15 Q