3v4l.org

run code in 500+ PHP versions simultaneously
<?php // This is our range of numbers $numbers = range(1, 5); // Our closure $double = function($a) { return $a * 2; }; // Use the closure as a callback here to // double the size of each element in our // range $new_numbers = array_map($double, $numbers); print implode(' ', $new_numbers); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pOTkX
function name:  (null)
number of ops:  15
compiled vars:  !0 = $numbers, !1 = $double, !2 = $new_numbers
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'range'
          1        SEND_VAL                                                     1
          2        SEND_VAL                                                     5
          3        DO_ICALL                                             $3      
          4        ASSIGN                                                       !0, $3
    7     5        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
          6        ASSIGN                                                       !1, ~5
   14     7        INIT_FCALL                                                   'array_map'
          8        SEND_VAR                                                     !1
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                             $7      
         11        ASSIGN                                                       !2, $7
   16    12        FRAMELESS_ICALL_2                implode             ~9      '+', !2
         13        ECHO                                                         ~9
   17    14      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pOTkX
function name:  {closure:/in/pOTkX:7}
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    8     1        MUL                                                  ~1      !0, 2
          2      > RETURN                                                       ~1
    9     3*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.19 ms | 3303 KiB | 15 Q