3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = array("A","B","C","D"); $childList = $list; foreach ( $childList as $key => &$var ) { cleanChild($childList, $list, $var, $key); $childList = $list; } echo "\n"; function cleanChild(&$childList, &$list, $var, $key) { if ($key == 'B') { unset($list[$key]); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/8WhdE
function name:  (null)
number of ops:  16
compiled vars:  !0 = $list, !1 = $childList, !2 = $var, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, !0
    6     2      > FE_RESET_RW                                      $6      !1, ->13
          3    > > FE_FETCH_RW                                      ~7      $6, !2, ->13
          4    >   ASSIGN                                                   !3, ~7
    7     5        INIT_FCALL_BY_NAME                                       'cleanChild'
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !2
          9        SEND_VAR_EX                                              !3
         10        DO_FCALL                                      0          
    8    11        ASSIGN                                                   !1, !0
    6    12      > JMP                                                      ->3
         13    >   FE_FREE                                                  $6
   11    14        ECHO                                                     '%0A'
   19    15      > RETURN                                                   1

Function cleanchild:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/8WhdE
function name:  cleanChild
number of ops:  8
compiled vars:  !0 = $childList, !1 = $list, !2 = $var, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   14     4        IS_EQUAL                                                 !3, 'B'
          5      > JMPZ                                                     ~4, ->7
   15     6    >   UNSET_DIM                                                !1, !3
   17     7    > > RETURN                                                   null

End of function cleanchild

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.8 ms | 940 KiB | 14 Q