3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 'baz'; $haystack = array('foo', 'bar', true); print "\n"; print "--START--\n"; var_dump($value); var_dump($haystack); var_dump(in_array($value, $haystack, true)); var_dump(in_array($value, $haystack, false)); print "--END--\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v4jJn
function name:  (null)
number of ops:  28
compiled vars:  !0 = $value, !1 = $haystack
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'baz'
    3     1        ASSIGN                                                   !1, <array>
    5     2        ECHO                                                     '%0A'
    6     3        ECHO                                                     '--START--%0A'
    7     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    8     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    9    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'in_array'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !1
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $6      
         16        SEND_VAR                                                 $6
         17        DO_ICALL                                                 
   10    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'in_array'
         20        SEND_VAR                                                 !0
         21        SEND_VAR                                                 !1
         22        SEND_VAL                                                 <false>
         23        DO_ICALL                                         $8      
         24        SEND_VAR                                                 $8
         25        DO_ICALL                                                 
   11    26        ECHO                                                     '--END--%0A'
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.71 ms | 1395 KiB | 17 Q