3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo array_reduce(['a', 'b', 'c'], function($output, $item) { static $count = 0; return $output . ++$count . '. ' . $item . "\n"; }, '');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D0Nv2
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'array_reduce'
          1        SEND_VAL                                                     <array>
          2        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
          3        SEND_VAL                                                     ~0
          4        SEND_VAL                                                     ''
          5        DO_ICALL                                             $1      
          6        ECHO                                                         $1
          7      > 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/D0Nv2
function name:  {closure:/in/D0Nv2:3}
number of ops:  10
compiled vars:  !0 = $output, !1 = $item, !2 = $count
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
          0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
          3        PRE_INC                                              ~3      !2
          4        CONCAT                                               ~4      !0, ~3
          5        CONCAT                                               ~5      ~4, '.+'
          6        CONCAT                                               ~6      ~5, !1
          7        CONCAT                                               ~7      ~6, '%0A'
          8      > RETURN                                                       ~7
          9*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.69 ms | 1852 KiB | 14 Q