3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testfunc { public static function load($arr) { $obj = new get_class(self); foreach($arr as $key=>$val) { $obj[$key] = $arr; } } } print_r(Testfunc::load(array('test'=>'derp')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mEiRE
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_STATIC_METHOD_CALL                                  'Testfunc', 'load'
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Class Testfunc:
Function load:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/mEiRE
function name:  load
number of ops:  14
compiled vars:  !0 = $arr, !1 = $obj, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        NEW                                              $4      'get_class'
          2        FETCH_CONSTANT                                   ~5      'self'
          3        SEND_VAL_EX                                              ~5
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
    5     6      > FE_RESET_R                                       $8      !0, ->12
          7    > > FE_FETCH_R                                       ~9      $8, !2, ->12
          8    >   ASSIGN                                                   !3, ~9
    6     9        ASSIGN_DIM                                               !1, !3
         10        OP_DATA                                                  !0
    5    11      > JMP                                                      ->7
         12    >   FE_FREE                                                  $8
    8    13      > RETURN                                                   null

End of function load

End of class Testfunc.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.96 ms | 1395 KiB | 15 Q