3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = range(1,10); array_map($r, function(&$value, $key) { $double = $value*2; if ($double >= 12) { $value = $double; } else { unset($r[$key]); } }); var_dump($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d200A
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_map'
          6        SEND_VAR                                                 !0
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd200A%3A5%240'
   12     8        SEND_VAL                                                 ~3
          9        DO_ICALL                                                 
   14    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fd200A%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/d200A
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $value, !1 = $key, !2 = $double, !3 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        MUL                                              ~4      !0, 2
          3        ASSIGN                                                   !2, ~4
    7     4        IS_SMALLER_OR_EQUAL                                      12, !2
          5      > JMPZ                                                     ~6, ->8
    8     6    >   ASSIGN                                                   !0, !2
          7      > JMP                                                      ->9
   10     8    >   UNSET_DIM                                                !3, !1
   12     9    > > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.87 ms | 1396 KiB | 19 Q