3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("precision", 20); $array_1 = range(1, 1.9, 0.1); var_dump($array_1); var_dump(in_array(1.7, $array_1)); $array_2 = range(0, 0.9, 0.1); var_dump($array_2); var_dump(in_array(0.3, $array_2)); var_dump(in_array(0.6, $array_2)); var_dump(in_array(0.7, $array_2)); //=>it return false;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Nb2iK
function name:  (null)
number of ops:  51
compiled vars:  !0 = $array_1, !1 = $array_2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'precision'
          2        SEND_VAL                                                 20
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'range'
          5        SEND_VAL                                                 1
          6        SEND_VAL                                                 1.9
          7        SEND_VAL                                                 0.1
          8        DO_ICALL                                         $3      
          9        ASSIGN                                                   !0, $3
    6    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'in_array'
         15        SEND_VAL                                                 1.7
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $6      
         18        SEND_VAR                                                 $6
         19        DO_ICALL                                                 
    9    20        INIT_FCALL                                               'range'
         21        SEND_VAL                                                 0
         22        SEND_VAL                                                 0.9
         23        SEND_VAL                                                 0.1
         24        DO_ICALL                                         $8      
         25        ASSIGN                                                   !1, $8
   10    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                                 
   11    29        INIT_FCALL                                               'var_dump'
         30        INIT_FCALL                                               'in_array'
         31        SEND_VAL                                                 0.3
         32        SEND_VAR                                                 !1
         33        DO_ICALL                                         $11     
         34        SEND_VAR                                                 $11
         35        DO_ICALL                                                 
   12    36        INIT_FCALL                                               'var_dump'
         37        INIT_FCALL                                               'in_array'
         38        SEND_VAL                                                 0.6
         39        SEND_VAR                                                 !1
         40        DO_ICALL                                         $13     
         41        SEND_VAR                                                 $13
         42        DO_ICALL                                                 
   13    43        INIT_FCALL                                               'var_dump'
         44        INIT_FCALL                                               'in_array'
         45        SEND_VAL                                                 0.7
         46        SEND_VAR                                                 !1
         47        DO_ICALL                                         $15     
         48        SEND_VAR                                                 $15
         49        DO_ICALL                                                 
   15    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.12 ms | 1404 KiB | 21 Q