3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strArr = str_split('AGHIJKLAL'); $temp = []; foreach($strArr as $v){ if(in_array($v, $temp)){ $repeatChar = $v; break; }else{ $temp[] = $v; } } echo $repeatChar;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 18
Branch analysis from position: 18
filename:       /in/utjU2
function name:  (null)
number of ops:  21
compiled vars:  !0 = $strArr, !1 = $temp, !2 = $v, !3 = $repeatChar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_split'
          1        SEND_VAL                                                 'AGHIJKLAL'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    5     4        ASSIGN                                                   !1, <array>
    6     5      > FE_RESET_R                                       $7      !0, ->18
          6    > > FE_FETCH_R                                               $7, !2, ->18
    7     7    >   INIT_FCALL                                               'in_array'
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $8      
         11      > JMPZ                                                     $8, ->15
    8    12    >   ASSIGN                                                   !3, !2
    9    13      > JMP                                                      ->18
    7    14*       JMP                                                      ->17
   11    15    >   ASSIGN_DIM                                               !1
         16        OP_DATA                                                  !2
    6    17      > JMP                                                      ->6
         18    >   FE_FREE                                                  $7
   14    19        ECHO                                                     !3
   15    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
271.94 ms | 1006 KiB | 15 Q