3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a" => array(1)); $array2 = array("b" => array("1")); $a = array("1" => 1, "2" => 1, "3" => 1, "4" => 1); $b = array("2" => 1, "4" => 1, "5" => 1, "6" => 1); $result2 = array_intersect_key($a, $b); // 2 4 $result3 = array_intersect($a,$b); print_r($result2); print_r($result3); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/06iHg
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array1, !1 = $array2, !2 = $a, !3 = $b, !4 = $result2, !5 = $result3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    5     3        ASSIGN                                                   !3, <array>
    6     4        INIT_FCALL                                               'array_intersect_key'
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !3
          7        DO_ICALL                                         $10     
          8        ASSIGN                                                   !4, $10
    7     9        INIT_FCALL                                               'array_intersect'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $12     
         13        ASSIGN                                                   !5, $12
    9    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !4
         16        DO_ICALL                                                 
   10    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                                 
   12    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.17 ms | 1395 KiB | 19 Q