3v4l.org

run code in 300+ PHP versions simultaneously
<?php $counter = function ($carry, array $item) { return $carry + count($item); }; $recommendations = [ [1],[2],[3] ]; $res = array_reduce($recommendations, $counter, 0); var_dump($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1VTWD
function name:  (null)
number of ops:  13
compiled vars:  !0 = $counter, !1 = $recommendations, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F1VTWD%3A3%240'
          1        ASSIGN                                                   !0, ~3
    7     2        ASSIGN                                                   !1, <array>
   10     3        INIT_FCALL                                               'array_reduce'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 0
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
   12     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.66 ms | 1395 KiB | 17 Q