3v4l.org

run code in 300+ PHP versions simultaneously
<?php $titles_array = array("asdf","xcv","","123"); $subject = "sd"; print_r($titles_array); foreach($titles_array as $k=>$v) { if(strpos($subject,$v) !== false) { $i++; $asd[$titles['id']] = $i; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 18
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/oh9YE
function name:  (null)
number of ops:  21
compiled vars:  !0 = $titles_array, !1 = $subject, !2 = $v, !3 = $k, !4 = $i, !5 = $asd, !6 = $titles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'sd'
    4     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    5     5      > FE_RESET_R                                       $10     !0, ->19
          6    > > FE_FETCH_R                                       ~11     $10, !2, ->19
          7    >   ASSIGN                                                   !3, ~11
    6     8        INIT_FCALL                                               'strpos'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $13     
         12        TYPE_CHECK                                  1018          $13
         13      > JMPZ                                                     ~14, ->18
    7    14    >   PRE_INC                                                  !4
    8    15        FETCH_DIM_R                                      ~16     !6, 'id'
         16        ASSIGN_DIM                                               !5, ~16
         17        OP_DATA                                                  !4
    5    18    > > JMP                                                      ->6
         19    >   FE_FREE                                                  $10
   10    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.62 ms | 1395 KiB | 17 Q