3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'This is a string!'; $i = 0; var_dump(implode('', array_map(function($val, $key) { return ($key % 2 ? $val : null); }, str_split($string))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Db85F
function name:  (null)
number of ops:  18
compiled vars:  !0 = $string, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'This+is+a+string%21'
    4     1        ASSIGN                                                   !1, 0
    5     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 ''
          5        INIT_FCALL                                               'array_map'
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FDb85F%3A5%240'
    7     7        SEND_VAL                                                 ~4
          8        INIT_FCALL_BY_NAME                                       '%C2%A0str_split'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FDb85F%3A5%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/Db85F
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $val, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     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
    7     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FDb85F%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.27 ms | 1396 KiB | 19 Q