3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'abclkjabc'; $notRepeated = []; foreach (count_chars($string, 1) as $char => $count) { if ($count === 1) { $notRepeated[] = chr($char); } } var_export($notRepeated); echo "\nCount = " . count($notRepeated);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/r4sFE
function name:  (null)
number of ops:  25
compiled vars:  !0 = $string, !1 = $notRepeated, !2 = $count, !3 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'abclkjabc'
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'count_chars'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $6      
          6      > FE_RESET_R                                       $7      $6, ->17
          7    > > FE_FETCH_R                                       ~8      $7, !2, ->17
          8    >   ASSIGN                                                   !3, ~8
    6     9        IS_IDENTICAL                                             !2, 1
         10      > JMPZ                                                     ~10, ->16
    7    11    >   INIT_FCALL                                               'chr'
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                         $12     
         14        ASSIGN_DIM                                               !1
         15        OP_DATA                                                  $12
    5    16    > > JMP                                                      ->7
         17    >   FE_FREE                                                  $7
   10    18        INIT_FCALL                                               'var_export'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
   11    21        COUNT                                            ~14     !1
         22        CONCAT                                           ~15     '%0ACount+%3D+', ~14
         23        ECHO                                                     ~15
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.83 ms | 1447 KiB | 16 Q