3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array('amount' => 50, 'amount' => 60, 'amount' => 100, 'amount' => 25, 'amount' => 30, 'amount' => 89, 'amount' => 90, 'amount' => 120, 'amount' => 16, 'amount' => 38); $itemsSum = 0; array_walk_recursive($items, function ($item) use (&$itemsSum) { $itemsSum += 1; }); echo $itemsSum;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/miRG4
function name:  (null)
number of ops:  10
compiled vars:  !0 = $items, !1 = $itemsSum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
    6     2        INIT_FCALL                                               'array_walk_recursive'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FmiRG4%3A6%240'
          5        BIND_LEXICAL                                             ~4, !1
    8     6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   10     8        ECHO                                                     !1
          9      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FmiRG4%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.89 ms | 1395 KiB | 15 Q