3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myclass { public $arr = array(); public function myfunc(){ $this->arr[1] = 'one'; $this->arr[2] = 'two'; } } $obj = new myclass; $this->myfunc(); print_r($obj->arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rFh4r
function name:  (null)
number of ops:  11
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'myclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        FETCH_THIS                                       $4      
          4        INIT_METHOD_CALL                                         $4, 'myfunc'
          5        DO_FCALL                                      0          
   15     6        INIT_FCALL                                               'print_r'
          7        FETCH_OBJ_R                                      ~6      !0, 'arr'
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class myclass:
Function myfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rFh4r
function name:  myfunc
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_W                                      $0      'arr'
          1        ASSIGN_DIM                                               $0, 1
          2        OP_DATA                                                  'one'
    9     3        FETCH_OBJ_W                                      $2      'arr'
          4        ASSIGN_DIM                                               $2, 2
          5        OP_DATA                                                  'two'
   10     6      > RETURN                                                   null

End of function myfunc

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.11 ms | 1399 KiB | 15 Q