3v4l.org

run code in 300+ PHP versions simultaneously
<?php $venues = array( array( 'venue1' => 1, 'venue2' => 2, ), array( 'venue1' => 3, 'venue2' => 4, ), array ( 'venue1' => 2, 'venue2' => 1, ), array( 'venue1' => 5, 'venue2' => 6, ), ); $tmp = $venues; array_walk($tmp, static fn (array &$value) => sort($value)); $tmp = array_unique($tmp, SORT_REGULAR); $result = array_intersect_key($venues, $tmp); var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gcLQd
function name:  (null)
number of ops:  21
compiled vars:  !0 = $venues, !1 = $tmp, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   22     1        ASSIGN                                                   !1, !0
   23     2        INIT_FCALL                                               'array_walk'
          3        SEND_REF                                                 !1
          4        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          5        SEND_VAL                                                 ~5
          6        DO_ICALL                                                 
   24     7        INIT_FCALL                                               'array_unique'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 0
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !1, $7
   25    12        INIT_FCALL                                               'array_intersect_key'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !2, $9
   26    17        INIT_FCALL                                               'var_export'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
         20      > 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/gcLQd
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'sort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
          5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.94 ms | 1009 KiB | 18 Q