3v4l.org

run code in 500+ PHP versions simultaneously
<?php $hidden = [ 'apples' => 19, 'eggs' => 7, 'grapes' => 144, 'mushrooms' => 3, 'oranges' => 16 ]; $list = ['grapes', 'apples', 'eggs', 'oranges']; $flippedList = array_flip($list); var_export(array_values(array_replace($flippedList, array_intersect_key($hidden, $flippedList))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VvncJ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $hidden, !1 = $list, !2 = $flippedList
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
   10     1        ASSIGN                                                       !1, <array>
   11     2        INIT_FCALL                                                   'array_flip'
          3        SEND_VAR                                                     !1
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !2, $5
   13     6        INIT_FCALL                                                   'var_export'
          7        INIT_FCALL                                                   'array_values'
          8        INIT_FCALL                                                   'array_replace'
          9        SEND_VAR                                                     !2
         10        INIT_FCALL                                                   'array_intersect_key'
         11        SEND_VAR                                                     !0
         12        SEND_VAR                                                     !2
         13        DO_ICALL                                             $7      
         14        SEND_VAR                                                     $7
         15        DO_ICALL                                             $8      
         16        SEND_VAR                                                     $8
         17        DO_ICALL                                             $9      
         18        SEND_VAR                                                     $9
         19        DO_ICALL                                                     
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
196.84 ms | 2286 KiB | 18 Q