3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ ['filename' => 'a.php', 'description' => 'foo'], ['filename' => 'b.php', 'description' => 'fooey'], ['filename' => 'c.php', 'description' => 'bar'], ['filename' => 'd.php', 'description' => 'berry'], ['filename' => 'e.php', 'description' => 'buoy'], ['filename' => 'f.php', 'description' => 'barf'], ['filename' => 'g.php', 'description' => 'food'], ['filename' => 'h.php', 'description' => 'foodie'], ['filename' => 'i.php', 'description' => 'boof'], ['filename' => 'j.php', 'description' => 'boogey'], ['filename' => 'k.php', 'description' => 'fudge'], ['filename' => 'l.php', 'description' => 'fudgey'], ['filename' => 'm.php', 'description' => 'barge'], ['filename' => 'n.php', 'description' => 'buggy'], ['filename' => 'o.php', 'description' => 'booger'], ['filename' => 'p.php', 'description' => 'foobar'], ['filename' => 'q.php', 'description' => 'fubar'], ['filename' => 'r.php', 'description' => 'goof'], ['filename' => 's.php', 'description' => 'goofey'], ['filename' => 't.php', 'description' => 'boofey'], ]; var_export( array_intersect_key( $input, array_flip( array_rand($input, 10) ) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/99t3Z
function name:  (null)
number of ops:  16
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   25     1        INIT_FCALL                                               'var_export'
   26     2        INIT_FCALL                                               'array_intersect_key'
   27     3        SEND_VAR                                                 !0
   28     4        INIT_FCALL                                               'array_flip'
   29     5        INIT_FCALL                                               'array_rand'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 10
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
   28    10        DO_ICALL                                         $3      
   29    11        SEND_VAR                                                 $3
   26    12        DO_ICALL                                         $4      
   29    13        SEND_VAR                                                 $4
   25    14        DO_ICALL                                                 
   32    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.19 ms | 1007 KiB | 17 Q