3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = array(5,6,7); $kp = "test:"; foreach (array_map(function($product) use ($kp) { return $kp . $product; }, $products) as $product) { echo $product; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/EKLf7
function name:  (null)
number of ops:  14
compiled vars:  !0 = $products, !1 = $kp, !2 = $product
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'test%3A'
    6     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FEKLf7%3A6%240'
          4        BIND_LEXICAL                                             ~5, !1
          5        SEND_VAL                                                 ~5
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8      > FE_RESET_R                                       $7      $6, ->12
          9    > > FE_FETCH_R                                               $7, !2, ->12
    8    10    >   ECHO                                                     !2
    6    11      > JMP                                                      ->9
         12    >   FE_FREE                                                  $7
    9    13      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FEKLf7%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.59 ms | 1395 KiB | 15 Q