3v4l.org

run code in 300+ 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                                  '%00%7Bclosure%7D%2Fin%2FD0Nv2%3A3%240'
          3        SEND_VAL                                                 ~0
          4        SEND_VAL                                                 ''
          5        DO_ICALL                                         $1      
          6        ECHO                                                     $1
          7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FD0Nv2%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D0Nv2
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FD0Nv2%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.66 ms | 1405 KiB | 15 Q