3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(array_map(function ($x, $y) { if ($x % 2) { return ['elems' => [$x, $y]]; } else { return null; } }, [1, 2, 3], ['a', 'b', 'c']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pf0kt
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FPf0kt%3A3%240'
    9     3        SEND_VAL                                                 ~0
          4        SEND_VAL                                                 <array>
          5        SEND_VAL                                                 <array>
          6        DO_ICALL                                         $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FPf0kt%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pf0kt
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        MOD                                              ~2      !0, 2
          3      > JMPZ                                                     ~2, ->9
    5     4    >   INIT_ARRAY                                       ~3      !0
          5        ADD_ARRAY_ELEMENT                                ~3      !1
          6        INIT_ARRAY                                       ~4      ~3, 'elems'
          7      > RETURN                                                   ~4
          8*       JMP                                                      ->10
    7     9    > > RETURN                                                   null
    9    10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FPf0kt%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.69 ms | 1395 KiB | 17 Q