3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'foo', 'foo', 'bar', 'baz', 'baz' ]; $arrRes = []; $arrLower = []; foreach ($arr as $v) { $lower = mb_strtolower($v, 'utf-8'); foreach ($arrLower as $lower2) { if ($lower === $lower2) { continue 2; } } $arrRes[] = $v; $arrLower[] = $lower; } var_dump($arr2);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 23
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 17
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/1spDZ
function name:  (null)
number of ops:  28
compiled vars:  !0 = $arr, !1 = $arrRes, !2 = $arrLower, !3 = $v, !4 = $lower, !5 = $lower2, !6 = $arr2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2        ASSIGN                                                   !2, <array>
   13     3      > FE_RESET_R                                       $10     !0, ->23
          4    > > FE_FETCH_R                                               $10, !3, ->23
   14     5    >   INIT_FCALL                                               'mb_strtolower'
          6        SEND_VAR                                                 !3
          7        SEND_VAL                                                 'utf-8'
          8        DO_ICALL                                         $11     
          9        ASSIGN                                                   !4, $11
   15    10      > FE_RESET_R                                       $13     !2, ->17
         11    > > FE_FETCH_R                                               $13, !5, ->17
   16    12    >   IS_IDENTICAL                                             !4, !5
         13      > JMPZ                                                     ~14, ->16
   17    14    >   FE_FREE                                                  $13
         15      > JMP                                                      ->4
   15    16    > > JMP                                                      ->11
         17    >   FE_FREE                                                  $13
   21    18        ASSIGN_DIM                                               !1
         19        OP_DATA                                                  !3
   22    20        ASSIGN_DIM                                               !2
         21        OP_DATA                                                  !4
   13    22      > JMP                                                      ->4
         23    >   FE_FREE                                                  $10
   25    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !6
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.67 ms | 1388 KiB | 17 Q