3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string.='testing'; $string.='produk_kemeja'; $pos=0; $count=0; while(($pos = strpos($string, 'produk_',$pos)) !== FALSE){ if((strpos($string, 'produk_')) !== FALSE){ echo $string; } $count++; $pos++; // This ends } echo $count;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 5
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 5
Branch analysis from position: 22
Branch analysis from position: 5
Branch analysis from position: 12
filename:       /in/4UtBV
function name:  (null)
number of ops:  24
compiled vars:  !0 = $string, !1 = $pos, !2 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_OP                                     8          !0, 'testing'
    3     1        ASSIGN_OP                                     8          !0, 'produk_kemeja'
    4     2        ASSIGN                                                   !1, 0
    5     3        ASSIGN                                                   !2, 0
    6     4      > JMP                                                      ->14
    7     5    >   INIT_FCALL                                               'strpos'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 'produk_'
          8        DO_ICALL                                         $7      
          9        TYPE_CHECK                                  1018          $7
         10      > JMPZ                                                     ~8, ->12
    8    11    >   ECHO                                                     !0
   11    12    >   PRE_INC                                                  !2
   12    13        PRE_INC                                                  !1
    6    14    >   INIT_FCALL                                               'strpos'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 'produk_'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $11     
         19        ASSIGN                                           ~12     !1, $11
         20        TYPE_CHECK                                  1018          ~12
         21      > JMPNZ                                                    ~13, ->5
   16    22    >   ECHO                                                     !2
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.37 ms | 1395 KiB | 15 Q