3v4l.org

run code in 300+ PHP versions simultaneously
<?php $config = []; $config['base_url'] = '/mypath/'; class myclass{ public function myfunc(){ print_r($config); } } $obj = new myclass; $obj->myfunc;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iNZOv
function name:  (null)
number of ops:  9
compiled vars:  !0 = $config, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_DIM                                               !0, 'base_url'
          2        OP_DATA                                                  '%2Fmypath%2F'
   13     3        NEW                                              $4      'myclass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
   14     6        FETCH_OBJ_R                                      ~7      !1, 'myfunc'
          7        FREE                                                     ~7
          8      > RETURN                                                   1

Class myclass:
Function myfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iNZOv
function name:  myfunc
number of ops:  4
compiled vars:  !0 = $config
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'print_r'
          1        SEND_VAR                                                 !0
          2        DO_ICALL                                                 
   10     3      > RETURN                                                   null

End of function myfunc

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.15 ms | 1001 KiB | 14 Q