3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 0 => array(1, 2, 3, 4), 1 => array(1, 3, 2, 4), 2 => array(1, 2, 4, 3), 3 => array(1, 2, 5, 6) ); $filter = array(); $result = array_filter($array, function($e) use (&$filter) { $sum = array_sum($e); $ret = isset($filter[$sum]); $filter[$sum] = true; return !$ret; }); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9H60L
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array, !1 = $filter, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   11     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          5        BIND_LEXICAL                                             ~5, !1
   17     6        SEND_VAL                                                 ~5
   11     7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
   19     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9H60L
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $e, !1 = $filter, !2 = $sum, !3 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   12     2        INIT_FCALL                                               'array_sum'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !2, $4
   13     6        ISSET_ISEMPTY_DIM_OBJ                         0  ~6      !1, !2
          7        ASSIGN                                                   !3, ~6
   14     8        ASSIGN_DIM                                               !1, !2
          9        OP_DATA                                                  <true>
   16    10        BOOL_NOT                                         ~9      !3
         11      > RETURN                                                   ~9
   17    12*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.26 ms | 1004 KiB | 16 Q