3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1, 2, 3); $values = &$a; foreach ($values as $value) { $values[3] = "bob"; if ($value == "bob") { $values[3] = "We made it into the if"; } } var_dump($values);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/uF3n8
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $values, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN_REF                                               !1, !0
    5     2      > FE_RESET_R                                       $5      !1, ->11
          3    > > FE_FETCH_R                                               $5, !2, ->11
    6     4    >   ASSIGN_DIM                                               !1, 3
          5        OP_DATA                                                  'bob'
    8     6        IS_EQUAL                                                 !2, 'bob'
          7      > JMPZ                                                     ~7, ->10
    9     8    >   ASSIGN_DIM                                               !1, 3
          9        OP_DATA                                                  'We+made+it+into+the+if'
    5    10    > > JMP                                                      ->3
         11    >   FE_FREE                                                  $5
   13    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.97 ms | 1386 KiB | 15 Q