3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testfunc { public static function load($arr) { $obj = new 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/4E0V1
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 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/4E0V1
function name:  load
number of ops:  12
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                          self                $4      
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    5     4      > FE_RESET_R                                       $7      !0, ->10
          5    > > FE_FETCH_R                                       ~8      $7, !2, ->10
          6    >   ASSIGN                                                   !3, ~8
    6     7        ASSIGN_DIM                                               !1, !3
          8        OP_DATA                                                  !0
    5     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $7
    8    11      > RETURN                                                   null

End of function load

End of class Testfunc.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.94 ms | 1387 KiB | 15 Q