3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = str_split('This is a string!'); $i = 0; array_map(function($val, $key) { return $key % 2 ? $val : null; }, $string, array_keys($string));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c3lHJ
function name:  (null)
number of ops:  15
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%2Fc3lHJ%3A6%240'
    8     7        SEND_VAL                                                 ~5
          8        SEND_VAR                                                 !0
          9        INIT_FCALL                                               'array_keys'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fc3lHJ%3A6%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c3lHJ
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $val, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        MOD                                              ~2      !1, 2
          3      > JMPZ                                                     ~2, ->6
          4    >   QM_ASSIGN                                        ~3      !0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      null
          7    > > RETURN                                                   ~3
    8     8*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.66 ms | 1396 KiB | 19 Q