3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.72 ms | 1395 KiB | 15 Q