3v4l.org

run code in 300+ PHP versions simultaneously
<?php $facults = array('Леч. фак.' => 1, 'Пед. фак.' => 2, 'Стом. фак.' => 3, 'ВСО' => 4); $dog = ',Леч. фак.,Пед. фак.,'; for ($i=1; $i < (substr_count($dog, ',')); $i++) { echo $facults[((explode(',', $dog))[$i])]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 4
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 4
Branch analysis from position: 18
Branch analysis from position: 4
filename:       /in/RtOZv
function name:  (null)
number of ops:  19
compiled vars:  !0 = $facults, !1 = $dog, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, '%2C%D0%9B%D0%B5%D1%87.+%D1%84%D0%B0%D0%BA.%2C%D0%9F%D0%B5%D0%B4.+%D1%84%D0%B0%D0%BA.%2C'
    4     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->12
    5     4    >   INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '%2C'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        FETCH_DIM_R                                      ~7      $6, !2
          9        FETCH_DIM_R                                      ~8      !0, ~7
         10        ECHO                                                     ~8
    4    11        PRE_INC                                                  !2
         12    >   INIT_FCALL                                               'substr_count'
         13        SEND_VAR                                                 !1
         14        SEND_VAL                                                 '%2C'
         15        DO_ICALL                                         $10     
         16        IS_SMALLER                                               !2, $10
         17      > JMPNZ                                                    ~11, ->4
    6    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.93 ms | 1395 KiB | 17 Q