3v4l.org

run code in 300+ PHP versions simultaneously
<?php $config = []; $config['base_url'] = '/mypath/'; class myclass{ public function myfunc(){ global $config; echo $config['base_url']; } } $obj = new myclass; $obj->myfunc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kRaSF
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'
   14     3        NEW                                              $4      'myclass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
   15     6        INIT_METHOD_CALL                                         !1, 'myfunc'
          7        DO_FCALL                                      0          
          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/kRaSF
function name:  myfunc
number of ops:  4
compiled vars:  !0 = $config
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   BIND_GLOBAL                                              !0, 'config'
   10     1        FETCH_DIM_R                                      ~1      !0, 'base_url'
          2        ECHO                                                     ~1
   11     3      > RETURN                                                   null

End of function myfunc

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.46 ms | 1393 KiB | 13 Q