3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = str_split('This is a string!'); $i = 0; array_map(function() use ($i) { var_Dump(func_get_args()); var_dump($i); $i++; }, $string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RvkeS
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'str_split'
          1        SEND_VAL                                                 'This+is+a+string%21'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    5     4        ASSIGN                                                   !1, 0
    6     5        INIT_FCALL                                               'array_map'
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRvkeS%3A6%240'
          7        BIND_LEXICAL                                             ~5, !1
   10     8        SEND_VAL                                                 ~5
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FRvkeS%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RvkeS
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_STATIC                                              !0
    7     1        INIT_FCALL                                               'var_dump'
          2        FUNC_GET_ARGS                                    ~1      
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    8     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    9     8        PRE_INC                                                  !0
   10     9      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FRvkeS%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.38 ms | 1395 KiB | 19 Q