3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [7,7,7,7]; $b = [7,7,7]; $a = array_map(fn(int|array $element) => is_int($element) ? [$element] : $element, $a); $b = array_map(fn(int|array $element) => is_int($element) ? [$element] : $element, $b); $key = key(array_diff_assoc(array_merge(...$a), array_merge(...$b))); var_dump($key);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J4Dcn
function name:  (null)
number of ops:  34
compiled vars:  !0 = $a, !1 = $b, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          4        SEND_VAL                                                 ~5
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !0, $6
    7     8        INIT_FCALL                                               'array_map'
          9        DECLARE_LAMBDA_FUNCTION                          ~8      [1]
         10        SEND_VAL                                                 ~8
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !1, $9
    8    14        INIT_FCALL                                               'key'
         15        INIT_FCALL                                               'array_diff_assoc'
         16        INIT_FCALL                                               'array_merge'
         17        SEND_UNPACK                                              !0
         18        CHECK_UNDEF_ARGS                                         
         19        DO_ICALL                                         $11     
         20        SEND_VAR                                                 $11
         21        INIT_FCALL                                               'array_merge'
         22        SEND_UNPACK                                              !1
         23        CHECK_UNDEF_ARGS                                         
         24        DO_ICALL                                         $12     
         25        SEND_VAR                                                 $12
         26        DO_ICALL                                         $13     
         27        SEND_VAR                                                 $13
         28        DO_ICALL                                         $14     
         29        ASSIGN                                                   !2, $14
    9    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                                 
         33      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
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/J4Dcn
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        TYPE_CHECK                                   16          !0
          2      > JMPZ                                                     ~1, ->6
          3    >   INIT_ARRAY                                       ~2      !0
          4        QM_ASSIGN                                        ~3      ~2
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      !0
          7    > > RETURN                                                   ~3
          8*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
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/J4Dcn
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        TYPE_CHECK                                   16          !0
          2      > JMPZ                                                     ~1, ->6
          3    >   INIT_ARRAY                                       ~2      !0
          4        QM_ASSIGN                                        ~3      ~2
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      !0
          7    > > RETURN                                                   ~3
          8*     > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.05 ms | 1014 KiB | 18 Q