3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array( 'id' => 1, 'user_name'=>'test1' ), array( 'id' => 2, 'user_name'=>'test2' ), array( 'id' => 3, 'user_name'=>'test3' ) ); $arr2 = array( array( 'id' => 1, 'shop_name'=>'shop1' ), array( 'id' => 5, 'shop_name'=>'shop2' ), array( 'id' => 3, 'shop_name'=>'shop3' ) ); function filter($item) { return count($item) == 3 ? $item : false; } $newArr = array_filter(array_merge($arr, $arr2), 'filter'); print_r($newArr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/57fHn
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr, !1 = $arr2, !2 = $newArr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   16     1        ASSIGN                                                   !1, <array>
   36     2        INIT_FCALL                                               'array_filter'
          3        INIT_FCALL                                               'array_merge'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        SEND_VAL                                                 'filter'
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
   38    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function filter:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/57fHn
function name:  filter
number of ops:  9
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   RECV                                             !0      
   33     1        COUNT                                            ~1      !0
          2        IS_EQUAL                                                 ~1, 3
          3      > JMPZ                                                     ~2, ->6
          4    >   QM_ASSIGN                                        ~3      !0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      <false>
          7    > > RETURN                                                   ~3
   34     8*     > RETURN                                                   null

End of function filter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.8 ms | 1400 KiB | 19 Q