3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=[[8,9,7],[7,8,9,33,21],[11,12,33,21,9,31]]; $unique=preg_match_all('~\b(\d+)\b(?!.*\b\1\b)~',json_encode($array),$out)?$out[0]:[]; sort($unique); var_export($unique);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XtERT
function name:  (null)
number of ops:  22
compiled vars:  !0 = $array, !1 = $unique, !2 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%7E%5Cb%28%5Cd%2B%29%5Cb%28%3F%21.%2A%5Cb%5C1%5Cb%29%7E'
          3        INIT_FCALL                                               'json_encode'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        SEND_REF                                                 !2
          8        DO_ICALL                                         $5      
          9      > JMPZ                                                     $5, ->13
         10    >   FETCH_DIM_R                                      ~6      !2, 0
         11        QM_ASSIGN                                        ~7      ~6
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~7      <array>
         14    >   ASSIGN                                                   !1, ~7
    4    15        INIT_FCALL                                               'sort'
         16        SEND_REF                                                 !1
         17        DO_ICALL                                                 
    5    18        INIT_FCALL                                               'var_export'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.56 ms | 1013 KiB | 17 Q