3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST["some_key"] = "some_value"; $m=['GET'=>$_GET,'POST'=>$_POST]; foreach($m as$k=>$v){ echo count($v)? $k.' was requested.':null; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/U51TE
function name:  (null)
number of ops:  21
compiled vars:  !0 = $m, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $3      '_POST'
          1        ASSIGN_DIM                                               $3, 'some_key'
          2        OP_DATA                                                  'some_value'
    5     3        FETCH_R                      global              ~5      '_GET'
          4        INIT_ARRAY                                       ~6      ~5, 'GET'
          5        FETCH_R                      global              ~7      '_POST'
          6        ADD_ARRAY_ELEMENT                                ~6      ~7, 'POST'
          7        ASSIGN                                                   !0, ~6
    7     8      > FE_RESET_R                                       $9      !0, ->19
          9    > > FE_FETCH_R                                       ~10     $9, !1, ->19
         10    >   ASSIGN                                                   !2, ~10
    8    11        COUNT                                            ~12     !1
         12      > JMPZ                                                     ~12, ->16
    9    13    >   CONCAT                                           ~13     !2, '+was+requested.'
         14        QM_ASSIGN                                        ~14     ~13
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~14     null
         17    >   ECHO                                                     ~14
    7    18      > JMP                                                      ->9
         19    >   FE_FREE                                                  $9
   12    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.28 ms | 1442 KiB | 13 Q