3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('a' => 1, 'b' => 2); $b = array('b' => 2, 'a' => 1); $c = array($b, 123, 'b'); echo (int) in_array($a, $c); echo (int) in_array($a, $c, true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2g7hF
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_ARRAY                                       ~5      !1
          3        ADD_ARRAY_ELEMENT                                ~5      123
          4        ADD_ARRAY_ELEMENT                                ~5      'b'
          5        ASSIGN                                                   !2, ~5
    7     6        INIT_FCALL                                               'in_array'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $7      
         10        CAST                                          4  ~8      $7
         11        ECHO                                                     ~8
    8    12        INIT_FCALL                                               'in_array'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !2
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $9      
         17        CAST                                          4  ~10     $9
         18        ECHO                                                     ~10
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.5 ms | 1394 KiB | 15 Q