3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input ="we are the people who are selected by the people of country who gave vote."; $words = array_count_values(explode(' ', strtolower($input))); $first_occ = ''; foreach ($words as $word => $count) { if ($count > 1) { $first_occ = $word; break; } } echo $first_occ;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 21
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 21
Branch analysis from position: 21
filename:       /in/C1F21
function name:  (null)
number of ops:  24
compiled vars:  !0 = $input, !1 = $words, !2 = $first_occ, !3 = $count, !4 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'we+are+the+people+who+are+selected+by+the+people+of+country+who+gave+vote.'
    4     1        INIT_FCALL                                               'array_count_values'
          2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '+'
          4        INIT_FCALL                                               'strtolower'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        SEND_VAR                                                 $6
          8        DO_ICALL                                         $7      
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !1, $8
    6    12        ASSIGN                                                   !2, ''
    7    13      > FE_RESET_R                                       $11     !1, ->21
         14    > > FE_FETCH_R                                       ~12     $11, !3, ->21
         15    >   ASSIGN                                                   !4, ~12
    8    16        IS_SMALLER                                               1, !3
         17      > JMPZ                                                     ~14, ->20
    9    18    >   ASSIGN                                                   !2, !4
   10    19      > JMP                                                      ->21
    7    20    > > JMP                                                      ->14
         21    >   FE_FREE                                                  $11
   13    22        ECHO                                                     !2
   14    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.12 ms | 1000 KiB | 16 Q