3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function clean(array &$c) { foreach ($c as $key => &$val) { $val .= 'shiznit-'; } } } $arr = array('franz', 'cheryl'); $a = new A; $a->clean($arr); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aAo2Y
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arr, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, <array>
   14     1        NEW                                              $3      'A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   15     4        INIT_METHOD_CALL                                         !1, 'clean'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   18     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class A:
Function clean:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/aAo2Y
function name:  clean
number of ops:  8
compiled vars:  !0 = $c, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1      > FE_RESET_RW                                      $3      !0, ->6
          2    > > FE_FETCH_RW                                      ~4      $3, !1, ->6
          3    >   ASSIGN                                                   !2, ~4
    7     4        ASSIGN_OP                                     8          !1, 'shiznit-'
    6     5      > JMP                                                      ->2
          6    >   FE_FREE                                                  $3
    9     7      > RETURN                                                   null

End of function clean

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.79 ms | 1395 KiB | 15 Q