3v4l.org

run code in 300+ PHP versions simultaneously
<?php $double = function($a) { return $a * 2; }; $numbers = range(1,5); $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/eHhtW
function name:  (null)
number of ops:  18
compiled vars:  !0 = $double, !1 = $numbers, !2 = $new_numbers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FeHhtW%3A3%240'
          1        ASSIGN                                                   !0, ~3
    7     2        INIT_FCALL                                               'range'
          3        SEND_VAL                                                 1
          4        SEND_VAL                                                 5
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    9     7        INIT_FCALL                                               'array_map'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
   11    12        INIT_FCALL                                               'implode'
         13        SEND_VAL                                                 '+'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $9      
         16        ECHO                                                     $9
         17      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.86 ms | 1395 KiB | 19 Q