3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [5, 7, 11, 67, 4, 12, 15]; $min = 10; echo array_reduce($array, fn($carry, $item) => $carry + ($item > $min), 0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nC28D
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array, !1 = $min
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 10
    4     2        INIT_FCALL                                               'array_reduce'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          5        BIND_LEXICAL                                             ~4, !1
          6        SEND_VAL                                                 ~4
          7        SEND_VAL                                                 0
          8        DO_ICALL                                         $5      
          9        ECHO                                                     $5
         10      > 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/nC28D
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $carry, !1 = $item, !2 = $min
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        IS_SMALLER                                       ~3      !2, !1
          4        ADD                                              ~4      !0, ~3
          5      > RETURN                                                   ~4
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.01 ms | 997 KiB | 14 Q