3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.88 ms | 1395 KiB | 15 Q