3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['x', 'y', 'z']; array_push($array, "test"); foreach($array as $element) { if ($element=='x') { $element = 'a'; } ?> <li><?php echo $element ?></li> <?php } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 10
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/dilji
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array, !1 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_push'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'test'
          4        DO_ICALL                                                 
    5     5      > FE_RESET_R                                       $4      !0, ->14
          6    > > FE_FETCH_R                                               $4, !1, ->14
    6     7    >   IS_EQUAL                                                 !1, 'x'
          8      > JMPZ                                                     ~5, ->10
    7     9    >   ASSIGN                                                   !1, 'a'
   10    10    >   ECHO                                                     '%3Cli%3E'
         11        ECHO                                                     !1
         12        ECHO                                                     '%3C%2Fli%3E%0A'
    5    13      > JMP                                                      ->6
         14    >   FE_FREE                                                  $4
   11    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.55 ms | 1395 KiB | 15 Q