3v4l.org

run code in 300+ PHP versions simultaneously
<?php $counter = 0; $Symbols = array('1', '2', '3', '4', '45', '100', '0'); $row = '120321'; //for example foreach ($Symbols as $sym) { if (strpos($row, $sym) !== false) { $counter++; } } echo $counter; // It will give you counter of all element in array persent in the $row ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/anDON
function name:  (null)
number of ops:  16
compiled vars:  !0 = $counter, !1 = $Symbols, !2 = $row, !3 = $sym
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, '120321'
    7     3      > FE_RESET_R                                       $7      !1, ->13
          4    > > FE_FETCH_R                                               $7, !3, ->13
    8     5    >   INIT_FCALL                                               'strpos'
          6        SEND_VAR                                                 !2
          7        SEND_VAR                                                 !3
          8        DO_ICALL                                         $8      
          9        TYPE_CHECK                                  1018          $8
         10      > JMPZ                                                     ~9, ->12
    9    11    >   PRE_INC                                                  !0
    7    12    > > JMP                                                      ->4
         13    >   FE_FREE                                                  $7
   12    14        ECHO                                                     !0
   13    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.72 ms | 1386 KiB | 15 Q