3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$tu=array(синий, белый, красный); $сolours = 'синий, белый, красный'; $tu = explode(",", $сolours); foreach($tu as $key =>$value) { $search_array = array('синий' => '#111', 'красный' =>'#222', 'белый'=>'#333'); if (array_key_exists($value, $search_array)) { $color[]=$search_array[$value]; } } print_r($color);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/Y1qeS
function name:  (null)
number of ops:  21
compiled vars:  !0 = $сolours, !1 = $tu, !2 = $value, !3 = $key, !4 = $search_array, !5 = $color
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, '%D1%81%D0%B8%D0%BD%D0%B8%D0%B9%2C+%D0%B1%D0%B5%D0%BB%D1%8B%D0%B9%2C+%D0%BA%D1%80%D0%B0%D1%81%D0%BD%D1%8B%D0%B9'
    8     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !1, $7
   10     6      > FE_RESET_R                                       $9      !1, ->16
          7    > > FE_FETCH_R                                       ~10     $9, !2, ->16
          8    >   ASSIGN                                                   !3, ~10
   11     9        ASSIGN                                                   !4, <array>
   12    10        ARRAY_KEY_EXISTS                                         !2, !4
         11      > JMPZ                                                     ~13, ->15
   13    12    >   FETCH_DIM_R                                      ~15     !4, !2
         13        ASSIGN_DIM                                               !5
         14        OP_DATA                                                  ~15
   10    15    > > JMP                                                      ->7
         16    >   FE_FREE                                                  $9
   16    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.46 ms | 1395 KiB | 17 Q