3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST = ['foo' => 'bar', 'foobar' => 123]; $validKeys = ['foo']; foreach ($validKeys as $key) { if (!isset($_POST['$key']) || !$_POST['$key']) { echo "$key: $val"; } // do stuff with $_POST[$key] }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 18
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/NYRbi
function name:  (null)
number of ops:  21
compiled vars:  !0 = $validKeys, !1 = $key, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $3      '_POST'
          1        ASSIGN                                                   $3, <array>
    5     2        ASSIGN                                                   !0, <array>
    7     3      > FE_RESET_R                                       $6      !0, ->19
          4    > > FE_FETCH_R                                               $6, !1, ->19
    8     5    >   FETCH_IS                                         ~7      '_POST'
          6        ISSET_ISEMPTY_DIM_OBJ                         0  ~8      ~7, '%24key'
          7        BOOL_NOT                                         ~9      ~8
          8      > JMPNZ_EX                                         ~9      ~9, ->13
          9    >   FETCH_R                      global              ~10     '_POST'
         10        FETCH_DIM_R                                      ~11     ~10, '%24key'
         11        BOOL_NOT                                         ~12     ~11
         12        BOOL                                             ~9      ~12
         13    > > JMPZ                                                     ~9, ->18
    9    14    >   ROPE_INIT                                     3  ~14     !1
         15        ROPE_ADD                                      1  ~14     ~14, '%3A+'
         16        ROPE_END                                      2  ~13     ~14, !2
         17        ECHO                                                     ~13
    7    18    > > JMP                                                      ->4
         19    >   FE_FREE                                                  $6
   13    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.57 ms | 1394 KiB | 13 Q