3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<STR THEDLSDARNVNS CCVBXXMTGFRWS CVIYTVBVSDOPTR VBNMAITYSURFD MOTYYERSAWERTY MOITRUHDYRTBDI VNOWUNMBORN STR; $fib = [1,2,3,5,8,13]; foreach (explode(PHP_EOL, $str) as $line) { // hack to make the array 1-based var_dump($line); $arr = str_split($line); array_unshift($arr, 'foo'); unset($arr[0]); $arr = array_filter($arr); foreach ($arr as $pos => $c) { // start at if ($pos > 9) { $index = $pos % 9; } else { $index = $pos; } // if in $fib array if (in_array($index, $fib)) { echo $c; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 42
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 42
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 40
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 40
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 39
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
Branch analysis from position: 39
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 40
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename:       /in/EAaFU
function name:  (null)
number of ops:  44
compiled vars:  !0 = $str, !1 = $fib, !2 = $line, !3 = $arr, !4 = $c, !5 = $pos, !6 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'THEDLSDARNVNS+%0ACCVBXXMTGFRWS+%0ACVIYTVBVSDOPTR+%0AVBNMAITYSURFD+%0AMOTYYERSAWERTY+%0AMOITRUHDYRTBDI+%0AVNOWUNMBORN'
   13     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%0A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $9      
          6      > FE_RESET_R                                       $10     $9, ->42
          7    > > FE_FETCH_R                                               $10, !2, ->42
   18     8    >   INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
   19    11        INIT_FCALL                                               'str_split'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !3, $12
   20    15        INIT_FCALL                                               'array_unshift'
         16        SEND_REF                                                 !3
         17        SEND_VAL                                                 'foo'
         18        DO_ICALL                                                 
   21    19        UNSET_DIM                                                !3, 0
   22    20        INIT_FCALL                                               'array_filter'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !3, $15
   24    24      > FE_RESET_R                                       $17     !3, ->40
         25    > > FE_FETCH_R                                       ~18     $17, !4, ->40
         26    >   ASSIGN                                                   !5, ~18
   27    27        IS_SMALLER                                               9, !5
         28      > JMPZ                                                     ~20, ->32
   28    29    >   MOD                                              ~21     !5, 9
         30        ASSIGN                                                   !6, ~21
         31      > JMP                                                      ->33
   30    32    >   ASSIGN                                                   !6, !5
   34    33    >   INIT_FCALL                                               'in_array'
         34        SEND_VAR                                                 !6
         35        SEND_VAR                                                 !1
         36        DO_ICALL                                         $24     
         37      > JMPZ                                                     $24, ->39
   35    38    >   ECHO                                                     !4
   24    39    > > JMP                                                      ->25
         40    >   FE_FREE                                                  $17
   15    41      > JMP                                                      ->7
         42    >   FE_FREE                                                  $10
   40    43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.89 ms | 1400 KiB | 25 Q