3v4l.org

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

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

End of function %00%7Bclosure%7D%2Fin%2FIvDdC%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.67 ms | 1395 KiB | 19 Q