3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'cats, e.g. Barsik, are funny. And it is true. So,'; $strN = ''; $found = $i = 0; do{ if($str[$i] == '.') $found++; $strN .= $str[$i]; $i++; }while($found != 3); echo $strN;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
Branch analysis from position: 8
filename:       /in/l3ibc
function name:  (null)
number of ops:  15
compiled vars:  !0 = $str, !1 = $strN, !2 = $found, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'cats%2C+e.g.+Barsik%2C+are+funny.+And+it+is+true.+So%2C'
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                           ~6      !3, 0
          3        ASSIGN                                                   !2, ~6
    6     4    >   FETCH_DIM_R                                      ~8      !0, !3
          5        IS_EQUAL                                                 ~8, '.'
          6      > JMPZ                                                     ~9, ->8
    7     7    >   PRE_INC                                                  !2
    8     8    >   FETCH_DIM_R                                      ~11     !0, !3
          9        ASSIGN_OP                                     8          !1, ~11
    9    10        PRE_INC                                                  !3
   10    11        IS_NOT_EQUAL                                             !2, 3
         12      > JMPNZ                                                    ~14, ->4
   11    13    >   ECHO                                                     !1
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.9 ms | 1393 KiB | 13 Q