3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [null, '', .0, false, null, 0, '0.0', -.1, "\0", false]; $unique = array(); foreach($array as $v){ isset($k[$v]) || ($k[$v]=1) && $unique[] = $v; } var_dump($unique);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/ZDcsU
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array, !1 = $unique, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    7     2      > FE_RESET_R                                       $6      !0, ->14
          3    > > FE_FETCH_R                                               $6, !2, ->14
    8     4    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~7      !3, !2
          5      > JMPNZ_EX                                         ~7      ~7, ->13
          6    >   ASSIGN_DIM                                       ~8      !3, !2
          7        OP_DATA                                                  1
          8      > JMPZ_EX                                          ~8      ~8, ->12
          9    >   ASSIGN_DIM                                       ~9      !1
         10        OP_DATA                                                  !2
         11        BOOL                                             ~8      ~9
         12    >   BOOL                                             ~7      ~8
    7    13    > > JMP                                                      ->3
         14    >   FE_FREE                                                  $6
   11    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.03 ms | 1000 KiB | 14 Q