3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array(5,6), array(1,2), array(6,5) ); array_walk($arr, 'sort'); $deduped = array(); foreach ($arr as $val) { $deduped[serialize($val)] = $val; } $arr = array_values($deduped); print_r($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/I6ilS
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arr, !1 = $deduped, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'sort'
          4        DO_ICALL                                                 
    6     5        ASSIGN                                                   !1, <array>
    7     6      > FE_RESET_R                                       $6      !0, ->14
          7    > > FE_FETCH_R                                               $6, !2, ->14
    8     8    >   INIT_FCALL                                               'serialize'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $7      
         11        ASSIGN_DIM                                               !1, $7
         12        OP_DATA                                                  !2
    7    13      > JMP                                                      ->7
         14    >   FE_FREE                                                  $6
   10    15        INIT_FCALL                                               'array_values'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $9      
         18        ASSIGN                                                   !0, $9
   12    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.56 ms | 1395 KiB | 21 Q