3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = str_split('pierwszy string { drugi string|trzeci string {czwarty string|piąty string}} szósty string {{ósmy string| dziewiąty string} dziesiąty string}{jedenasty string| dwunasty string} trzynasty string', 1); $a = array(); $a[] = ''; $c =& $a[0]; foreach ( $string as $val ) { switch ( $val ) { case '{': // kod break; case '|': // kod break; case '}': //kod break; default: $c .= $val; break; } } print_r($a);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 26
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 26
Branch analysis from position: 12
5 jumps found. (Code = 188) Position 1 = 20, Position 2 = 21, Position 3 = 22, Position 4 = 23, Position 5 = 13
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 22
Branch analysis from position: 21
Branch analysis from position: 20
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/kZDtV
function name:  (null)
number of ops:  31
compiled vars:  !0 = $string, !1 = $a, !2 = $c, !3 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'str_split'
          1        SEND_VAL                                                 'pierwszy+string+%7B+drugi+string%7Ctrzeci+string+%7Bczwarty+string%7Cpi%C4%85ty+string%7D%7D+sz%C3%B3sty+string+%7B%7B%C3%B3smy+string%7C+dziewi%C4%85ty+string%7D+dziesi%C4%85ty+string%7D%7Bjedenasty+string%7C+dwunasty+string%7D+trzynasty+string'
          2        SEND_VAL                                                 1
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
    3     5        ASSIGN                                                   !1, <array>
    4     6        ASSIGN_DIM                                               !1
          7        OP_DATA                                                  ''
    5     8        FETCH_DIM_W                                      $8      !1, 0
          9        ASSIGN_REF                                               !2, $8
    6    10      > FE_RESET_R                                       $10     !0, ->26
         11    > > FE_FETCH_R                                               $10, !3, ->26
    8    12    > > SWITCH_STRING                                            !3, [ '%7B':->20, '%7C':->21, '%7D':->22, ], ->23
   10    13    >   IS_EQUAL                                                 !3, '%7B'
         14      > JMPNZ                                                    ~11, ->20
   13    15    >   IS_EQUAL                                                 !3, '%7C'
         16      > JMPNZ                                                    ~11, ->21
   16    17    >   IS_EQUAL                                                 !3, '%7D'
         18      > JMPNZ                                                    ~11, ->22
         19    > > JMP                                                      ->23
   12    20    > > JMP                                                      ->25
   15    21    > > JMP                                                      ->25
   18    22    > > JMP                                                      ->25
   20    23    >   ASSIGN_OP                                     8          !2, !3
   21    24      > JMP                                                      ->25
    6    25    > > JMP                                                      ->11
         26    >   FE_FREE                                                  $10
   25    27        INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.21 ms | 1400 KiB | 17 Q