3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = range(1,10); array_walk($r, function(&$value, $key) { $double = $value*2; if ($double >= 12) { $value = $double; } else { unset($value); } echo $double, PHP_EOL; }); var_dump($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/63GIF
function name:  (null)
number of ops:  14
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    5     5        INIT_FCALL                                               'array_walk'
          6        SEND_REF                                                 !0
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F63GIF%3A5%240'
   13     8        SEND_VAL                                                 ~3
          9        DO_ICALL                                                 
   15    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F63GIF%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/63GIF
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $value, !1 = $key, !2 = $double
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        MUL                                              ~3      !0, 2
          3        ASSIGN                                                   !2, ~3
    7     4        IS_SMALLER_OR_EQUAL                                      12, !2
          5      > JMPZ                                                     ~5, ->8
    8     6    >   ASSIGN                                                   !0, !2
          7      > JMP                                                      ->9
   10     8    >   UNSET_CV                                                 !0
   12     9    >   ECHO                                                     !2
         10        ECHO                                                     '%0A'
   13    11      > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.66 ms | 1396 KiB | 19 Q