3v4l.org

run code in 500+ PHP versions simultaneously
<?php function wp_array_slice_assoc( $input_array, $keys ): array { $slice = array(); foreach ( $keys as $key ) { if ( isset( $input_array[ $key ] ) ) { $slice[ $key ] = $input_array[ $key ]; } } return $slice; } var_dump( wp_array_slice_assoc( '', '' ) ); var_dump( wp_array_slice_assoc( 0, 0 ) ); var_dump( wp_array_slice_assoc( false, true ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rabSX
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                                   'var_dump'
          1        INIT_FCALL                                                   'wp_array_slice_assoc'
          2        SEND_VAL                                                     ''
          3        SEND_VAL                                                     ''
          4        DO_FCALL                                          0  $0      
          5        SEND_VAR                                                     $0
          6        DO_ICALL                                                     
   16     7        INIT_FCALL                                                   'var_dump'
          8        INIT_FCALL                                                   'wp_array_slice_assoc'
          9        SEND_VAL                                                     0
         10        SEND_VAL                                                     0
         11        DO_FCALL                                          0  $2      
         12        SEND_VAR                                                     $2
         13        DO_ICALL                                                     
   17    14        INIT_FCALL                                                   'var_dump'
         15        INIT_FCALL                                                   'wp_array_slice_assoc'
         16        SEND_VAL                                                     <false>
         17        SEND_VAL                                                     <true>
         18        DO_FCALL                                          0  $4      
         19        SEND_VAR                                                     $4
         20        DO_ICALL                                                     
         21      > RETURN                                                       1

Function wp_array_slice_assoc:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/rabSX
function name:  wp_array_slice_assoc
number of ops:  16
compiled vars:  !0 = $input_array, !1 = $keys, !2 = $slice, !3 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    4     2        ASSIGN                                                       !2, <array>
    6     3      > FE_RESET_R                                           $5      !1, ->11
          4    > > FE_FETCH_R                                                   $5, !3, ->11
    7     5    >   ISSET_ISEMPTY_DIM_OBJ                             0          !0, !3
          6      > JMPZ                                                         ~6, ->10
    8     7    >   FETCH_DIM_R                                          ~8      !0, !3
          8        ASSIGN_DIM                                                   !2, !3
          9        OP_DATA                                                      ~8
    6    10    > > JMP                                                          ->4
         11    >   FE_FREE                                                      $5
   12    12        VERIFY_RETURN_TYPE                                           !2
         13      > RETURN                                                       !2
   13    14*       VERIFY_RETURN_TYPE                                           
         15*     > RETURN                                                       null

End of function wp_array_slice_assoc

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
136.85 ms | 485 KiB | 11 Q