3v4l.org

run code in 300+ PHP versions simultaneously
<?php $books_sorted = [ ["title" => "In Search of Lost Time", 'others' => 'unuseful1'], ["title" => "Don Quixote", 'others' => 'unuseful2'], ["title" => "The Great Gatsby", 'others' => 'unuseful3'] ]; $books_available = [ ["title" => "Moby Dick", 'others' => 'unuseful4'], ["title" => "In Search of Lost Time", 'others' => 'unuseful5'], ["title" => "The Great Gatsby", 'others' => 'unuseful6'], ["title" => "War and Peace", 'others' => 'unuseful7'] ]; var_export( array_merge( array_uintersect( $books_sorted, $books_available, fn($a, $b) => $a['title'] <=> $b['title'] ), array_udiff( $books_available, $books_sorted, fn($a, $b) => $a['title'] <=> $b['title'] ), ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cFdds
function name:  (null)
number of ops:  22
compiled vars:  !0 = $books_sorted, !1 = $books_available
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   16     2        INIT_FCALL                                               'var_export'
   17     3        INIT_FCALL                                               'array_merge'
   18     4        INIT_FCALL                                               'array_uintersect'
   19     5        SEND_VAR                                                 !0
   20     6        SEND_VAR                                                 !1
   21     7        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
   22     8        SEND_VAL                                                 ~4
   18     9        DO_ICALL                                         $5      
   22    10        SEND_VAR                                                 $5
   23    11        INIT_FCALL                                               'array_udiff'
   24    12        SEND_VAR                                                 !1
   25    13        SEND_VAR                                                 !0
   26    14        DECLARE_LAMBDA_FUNCTION                          ~6      [1]
   27    15        SEND_VAL                                                 ~6
   23    16        DO_ICALL                                         $7      
   27    17        SEND_VAR                                                 $7
   17    18        DO_ICALL                                         $8      
   27    19        SEND_VAR                                                 $8
   16    20        DO_ICALL                                                 
   29    21      > 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/cFdds
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_R                                      ~2      !0, 'title'
          3        FETCH_DIM_R                                      ~3      !1, 'title'
          4        SPACESHIP                                        ~4      ~2, ~3
          5      > RETURN                                                   ~4
   22     6*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cFdds
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_R                                      ~2      !0, 'title'
          3        FETCH_DIM_R                                      ~3      !1, 'title'
          4        SPACESHIP                                        ~4      ~2, ~3
          5      > RETURN                                                   ~4
   27     6*     > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.84 ms | 1006 KiB | 17 Q