3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.9 ms | 1395 KiB | 17 Q