3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST = [ 'wind_1' => 'hk', 'hamburger_66' => 'foo', 'wind_2' => 'pop', 'wind_25' => 'another' ]; foreach ($_POST as $k => $v) { if (strpos($k, 'wind_') === 0) { $key = $k; } } echo filter_var($key, FILTER_SANITIZE_NUMBER_INT);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/4ZWH0
function name:  (null)
number of ops:  21
compiled vars:  !0 = $v, !1 = $k, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $3      '_POST'
          1        ASSIGN                                                   $3, <array>
   10     2        FETCH_R                      global              ~5      '_POST'
          3      > FE_RESET_R                                       $6      ~5, ->14
          4    > > FE_FETCH_R                                       ~7      $6, !0, ->14
          5    >   ASSIGN                                                   !1, ~7
   11     6        INIT_FCALL                                               'strpos'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 'wind_'
          9        DO_ICALL                                         $9      
         10        IS_IDENTICAL                                             $9, 0
         11      > JMPZ                                                     ~10, ->13
   12    12    >   ASSIGN                                                   !2, !1
   10    13    > > JMP                                                      ->4
         14    >   FE_FREE                                                  $6
   15    15        INIT_FCALL                                               'filter_var'
         16        SEND_VAR                                                 !2
         17        SEND_VAL                                                 519
         18        DO_ICALL                                         $12     
         19        ECHO                                                     $12
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.61 ms | 1438 KiB | 15 Q