3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array( 'a' => 'A', 'b' => 'B', 'c' => 'C'); var_dump($arr); foreach ($arr as &$val) { if ($val == 'B') { unset($val); } } var_dump($arr); foreach ($arr as &$val) { if ($val == 'B') { $val = 'X'; } } var_dump($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 126) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 9
Branch analysis from position: 10
2 jumps found. (Code = 125) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 126) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 19
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 10
filename:       /in/87F4m
function name:  (null)
number of ops:  25
compiled vars:  !0 = $arr, !1 = $val
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   ASSIGN                                                   !0, <array>
   8     1        INIT_FCALL                                               'var_dump'
         2        SEND_VAR                                                 !0
         3        DO_ICALL                                                 
  10     4      > FE_RESET_RW                                      $4      !0, ->10
         5    > > FE_FETCH_RW                                              $4, !1, ->10
  11     6    >   IS_EQUAL                                         ~5      !1, 'B'
         7      > JMPZ                                                     ~5, ->9
  12     8    >   <196>                                                    !1
         9    > > JMP                                                      ->5
        10    >   FE_FREE                                                  $4
  16    11        INIT_FCALL                                               'var_dump'
        12        SEND_VAR                                                 !0
        13        DO_ICALL                                                 
  18    14      > FE_RESET_RW                                      $7      !0, ->20
        15    > > FE_FETCH_RW                                              $7, !1, ->20
  19    16    >   IS_EQUAL                                         ~8      !1, 'B'
        17      > JMPZ                                                     ~8, ->19
  20    18    >   ASSIGN                                                   !1, 'X'
        19    > > JMP                                                      ->15
        20    >   FE_FREE                                                  $7
  24    21        INIT_FCALL                                               'var_dump'
        22        SEND_VAR                                                 !0
        23        DO_ICALL                                                 
        24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0