3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'egg' => true, 'cheese' => false, 'hair' => 765, 'goblins' => null, 'ogres' => 'no ogres allowed in this array' ); // Loose checking -- return values are in comments // First three make sense, last four do not in_array(null, $array); // true in_array(false, $array); // true in_array(765, $array); // true in_array(763, $array); // true in_array('egg', $array); // true in_array('hhh', $array); // true in_array(array(), $array); // true
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOvAt
function name:  (null)
number of ops:  30
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'in_array'
          2        SEND_VAL                                                 null
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   15     5        INIT_FCALL                                               'in_array'
          6        SEND_VAL                                                 <false>
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   16     9        INIT_FCALL                                               'in_array'
         10        SEND_VAL                                                 765
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   17    13        INIT_FCALL                                               'in_array'
         14        SEND_VAL                                                 763
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
   18    17        INIT_FCALL                                               'in_array'
         18        SEND_VAL                                                 'egg'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
   19    21        INIT_FCALL                                               'in_array'
         22        SEND_VAL                                                 'hhh'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                                 
   20    25        INIT_FCALL                                               'in_array'
         26        SEND_VAL                                                 <array>
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.52 ms | 1395 KiB | 15 Q