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('WHATEVER', $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/MhtnG
function name:  (null)
number of ops:  115
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                                                 'WHATEVER'
         46        SEND_VAR                                                 !0
         47        DO_ICALL                                         $14     
         48        SEND_VAR                                                 $14
         49        DO_ICALL                                                 
   23    50        INIT_FCALL                                               'var_dump'
         51        INIT_FCALL                                               'in_array'
         52        SEND_VAL                                                 <array>
         53        SEND_VAR                                                 !0
         54        DO_ICALL                                         $16     
         55        SEND_VAR                                                 $16
         56        DO_ICALL                                                 
   26    57        ECHO                                                     'now+with+strict%0A'
   28    58        INIT_FCALL                                               'var_dump'
         59        INIT_FCALL                                               'in_array'
         60        SEND_VAL                                                 null
         61        SEND_VAR                                                 !0
         62        SEND_VAL                                                 <true>
         63        DO_ICALL                                         $18     
         64        SEND_VAR                                                 $18
         65        DO_ICALL                                                 
   29    66        INIT_FCALL                                               'var_dump'
         67        INIT_FCALL                                               'in_array'
         68        SEND_VAL                                                 <false>
         69        SEND_VAR                                                 !0
         70        SEND_VAL                                                 <true>
         71        DO_ICALL                                         $20     
         72        SEND_VAR                                                 $20
         73        DO_ICALL                                                 
   30    74        INIT_FCALL                                               'var_dump'
         75        INIT_FCALL                                               'in_array'
         76        SEND_VAL                                                 765
         77        SEND_VAR                                                 !0
         78        SEND_VAL                                                 <true>
         79        DO_ICALL                                         $22     
         80        SEND_VAR                                                 $22
         81        DO_ICALL                                                 
   31    82        INIT_FCALL                                               'var_dump'
         83        INIT_FCALL                                               'in_array'
         84        SEND_VAL                                                 763
         85        SEND_VAR                                                 !0
         86        SEND_VAL                                                 <true>
         87        DO_ICALL                                         $24     
         88        SEND_VAR                                                 $24
         89        DO_ICALL                                                 
   32    90        INIT_FCALL                                               'var_dump'
         91        INIT_FCALL                                               'in_array'
         92        SEND_VAL                                                 'egg'
         93        SEND_VAR                                                 !0
         94        SEND_VAL                                                 <true>
         95        DO_ICALL                                         $26     
         96        SEND_VAR                                                 $26
         97        DO_ICALL                                                 
   33    98        INIT_FCALL                                               'var_dump'
         99        INIT_FCALL                                               'in_array'
        100        SEND_VAL                                                 'hhh'
        101        SEND_VAR                                                 !0
        102        SEND_VAL                                                 <true>
        103        DO_ICALL                                         $28     
        104        SEND_VAR                                                 $28
        105        DO_ICALL                                                 
   34   106        INIT_FCALL                                               'var_dump'
        107        INIT_FCALL                                               'in_array'
        108        SEND_VAL                                                 <array>
        109        SEND_VAR                                                 !0
        110        SEND_VAL                                                 <true>
        111        DO_ICALL                                         $30     
        112        SEND_VAR                                                 $30
        113        DO_ICALL                                                 
   36   114      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.14 ms | 1404 KiB | 17 Q