3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "NLD,13673, 978, 0, 0;DEU,461312, 21555, 450173, 7007;DNK,322948, 15824, 322948, 50701;SWE,319044, 16715, 17889, 0"; $string2 = "NLD,13673, 978, 0, 0"; if(strstr($string, ";") !== false){ $multipleMatches = explode(';' ,$string); $amountMatches = count($multipleMatches); for($i = 0; $i <= $amountMatches; $i++){ echo $i; } echo $amountMatches; } else { echo "Not found"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 23
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 17
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 17
Branch analysis from position: 21
Branch analysis from position: 17
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/STjf2
function name:  (null)
number of ops:  25
compiled vars:  !0 = $string, !1 = $string2, !2 = $multipleMatches, !3 = $amountMatches, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'NLD%2C13673%2C+978%2C+0%2C+0%3BDEU%2C461312%2C+21555%2C+450173%2C+7007%3BDNK%2C322948%2C+15824%2C+322948%2C+50701%3BSWE%2C319044%2C+16715%2C+17889%2C+0'
    4     1        ASSIGN                                                   !1, 'NLD%2C13673%2C+978%2C+0%2C+0'
    6     2        INIT_FCALL                                               'strstr'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '%3B'
          5        DO_ICALL                                         $7      
          6        TYPE_CHECK                                  1018          $7
          7      > JMPZ                                                     ~8, ->23
    7     8    >   INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%3B'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    8    13        COUNT                                            ~11     !2
         14        ASSIGN                                                   !3, ~11
    9    15        ASSIGN                                                   !4, 0
         16      > JMP                                                      ->19
   10    17    >   ECHO                                                     !4
    9    18        PRE_INC                                                  !4
         19    >   IS_SMALLER_OR_EQUAL                                      !4, !3
         20      > JMPNZ                                                    ~15, ->17
   12    21    >   ECHO                                                     !3
         22      > JMP                                                      ->24
   14    23    >   ECHO                                                     'Not+found'
   15    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.07 ms | 1396 KiB | 17 Q