3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.81 ms | 1395 KiB | 15 Q