3v4l.org

run code in 300+ PHP versions simultaneously
<?php $info = [ 'length' => '1,2,3', ]; $lengths = explode(',', $info['length']); var_dump(in_array(1, $lengths, true)); var_dump(in_array('1', $lengths, true)); $lengths = array_map(function ($value) { return (int) $value; }, explode(',', $info['length'])); var_dump(in_array(1, $lengths, true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lPubnY
function name:  (null)
number of ops:  43
compiled vars:  !0 = $info, !1 = $lengths
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        FETCH_DIM_R                                      ~3      !0, 'length'
          4        SEND_VAL                                                 ~3
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    8     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'in_array'
          9        SEND_VAL                                                 1
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
    9    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'in_array'
         17        SEND_VAL                                                 '1'
         18        SEND_VAR                                                 !1
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                         $8      
         21        SEND_VAR                                                 $8
         22        DO_ICALL                                                 
   11    23        INIT_FCALL                                               'array_map'
         24        DECLARE_LAMBDA_FUNCTION                          ~10     [0]
   13    25        SEND_VAL                                                 ~10
         26        INIT_FCALL                                               'explode'
         27        SEND_VAL                                                 '%2C'
         28        FETCH_DIM_R                                      ~11     !0, 'length'
         29        SEND_VAL                                                 ~11
         30        DO_ICALL                                         $12     
         31        SEND_VAR                                                 $12
   11    32        DO_ICALL                                         $13     
         33        ASSIGN                                                   !1, $13
   14    34        INIT_FCALL                                               'var_dump'
         35        INIT_FCALL                                               'in_array'
         36        SEND_VAL                                                 1
         37        SEND_VAR                                                 !1
         38        SEND_VAL                                                 <true>
         39        DO_ICALL                                         $15     
         40        SEND_VAR                                                 $15
         41        DO_ICALL                                                 
         42      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lPubnY
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        CAST                                          4  ~1      !0
          2      > RETURN                                                   ~1
   13     3*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.6 ms | 1018 KiB | 17 Q