3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Example array $array = array( 'egg' => true, 'cheese' => false, 'hair' => 765, 'goblins' => null, 'ogres' => 'no ogres allowed in this array' ); // Loose checking var_dump(in_array(null, $array)); var_dump(in_array(false, $array)); var_dump(in_array(765, $array)); var_dump(in_array(763, $array)); var_dump(in_array('egg', $array)); var_dump(in_array('cheese', $array)); var_dump(in_array(array(), $array)); // Strict checking echo "now with strict\n"; var_dump(in_array(null, $array, true)); var_dump(in_array(false, $array, true)); var_dump(in_array(765, $array, true)); var_dump(in_array(763, $array, true)); var_dump(in_array('egg', $array, true)); var_dump(in_array('hhh', $array, true)); var_dump(in_array(array(), $array, true)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gt9l5
function name:  (null)
number of ops:  108
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
   16     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'in_array'
          3        SEND_VAL                                                 null
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
   17     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'in_array'
         10        SEND_VAL                                                 <false>
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                                 
   18    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'in_array'
         17        SEND_VAL                                                 765
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $6      
         20        SEND_VAR                                                 $6
         21        DO_ICALL                                                 
   19    22        INIT_FCALL                                               'var_dump'
         23        INIT_FCALL                                               'in_array'
         24        SEND_VAL                                                 763
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $8      
         27        SEND_VAR                                                 $8
         28        DO_ICALL                                                 
   20    29        INIT_FCALL                                               'var_dump'
         30        INIT_FCALL                                               'in_array'
         31        SEND_VAL                                                 'egg'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                         $10     
         34        SEND_VAR                                                 $10
         35        DO_ICALL                                                 
   21    36        INIT_FCALL                                               'var_dump'
         37        INIT_FCALL                                               'in_array'
         38        SEND_VAL                                                 'cheese'
         39        SEND_VAR                                                 !0
         40        DO_ICALL                                         $12     
         41        SEND_VAR                                                 $12
         42        DO_ICALL                                                 
   22    43        INIT_FCALL                                               'var_dump'
         44        INIT_FCALL                                               'in_array'
         45        SEND_VAL                                                 <array>
         46        SEND_VAR                                                 !0
         47        DO_ICALL                                         $14     
         48        SEND_VAR                                                 $14
         49        DO_ICALL                                                 
   25    50        ECHO                                                     'now+with+strict%0A'
   27    51        INIT_FCALL                                               'var_dump'
         52        INIT_FCALL                                               'in_array'
         53        SEND_VAL                                                 null
         54        SEND_VAR                                                 !0
         55        SEND_VAL                                                 <true>
         56        DO_ICALL                                         $16     
         57        SEND_VAR                                                 $16
         58        DO_ICALL                                                 
   28    59        INIT_FCALL                                               'var_dump'
         60        INIT_FCALL                                               'in_array'
         61        SEND_VAL                                                 <false>
         62        SEND_VAR                                                 !0
         63        SEND_VAL                                                 <true>
         64        DO_ICALL                                         $18     
         65        SEND_VAR                                                 $18
         66        DO_ICALL                                                 
   29    67        INIT_FCALL                                               'var_dump'
         68        INIT_FCALL                                               'in_array'
         69        SEND_VAL                                                 765
         70        SEND_VAR                                                 !0
         71        SEND_VAL                                                 <true>
         72        DO_ICALL                                         $20     
         73        SEND_VAR                                                 $20
         74        DO_ICALL                                                 
   30    75        INIT_FCALL                                               'var_dump'
         76        INIT_FCALL                                               'in_array'
         77        SEND_VAL                                                 763
         78        SEND_VAR                                                 !0
         79        SEND_VAL                                                 <true>
         80        DO_ICALL                                         $22     
         81        SEND_VAR                                                 $22
         82        DO_ICALL                                                 
   31    83        INIT_FCALL                                               'var_dump'
         84        INIT_FCALL                                               'in_array'
         85        SEND_VAL                                                 'egg'
         86        SEND_VAR                                                 !0
         87        SEND_VAL                                                 <true>
         88        DO_ICALL                                         $24     
         89        SEND_VAR                                                 $24
         90        DO_ICALL                                                 
   32    91        INIT_FCALL                                               'var_dump'
         92        INIT_FCALL                                               'in_array'
         93        SEND_VAL                                                 'hhh'
         94        SEND_VAR                                                 !0
         95        SEND_VAL                                                 <true>
         96        DO_ICALL                                         $26     
         97        SEND_VAR                                                 $26
         98        DO_ICALL                                                 
   33    99        INIT_FCALL                                               'var_dump'
        100        INIT_FCALL                                               'in_array'
        101        SEND_VAL                                                 <array>
        102        SEND_VAR                                                 !0
        103        SEND_VAL                                                 <true>
        104        DO_ICALL                                         $28     
        105        SEND_VAR                                                 $28
        106        DO_ICALL                                                 
   35   107      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.75 ms | 1396 KiB | 17 Q