3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array1 = array(0, 7, 5, 0); $array2 = array(2, 6, 10, 0, 5); $array3 = array(4, 8, 15, 10); $array4 = array(6, 7, 20, 10, 15); var_export( array_map( fn(...$col) => array_sum($col) / count(array_filter($col, fn($v) => !is_null($v))), $array1, $array2, $array3, $array4 ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vcvbk
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array1, !1 = $array2, !2 = $array3, !3 = $array4, !4 = $v
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
    5     2        ASSIGN                                                       !2, <array>
    6     3        ASSIGN                                                       !3, <array>
    8     4        INIT_FCALL                                                   'var_export'
    9     5        INIT_FCALL                                                   'array_map'
   10     6        DECLARE_LAMBDA_FUNCTION                              ~9      [0]
          7        BIND_LEXICAL                                                 ~9, !4
          8        SEND_VAL                                                     ~9
   11     9        SEND_VAR                                                     !0
   12    10        SEND_VAR                                                     !1
   13    11        SEND_VAR                                                     !2
   14    12        SEND_VAR                                                     !3
    9    13        DO_ICALL                                             $10     
   14    14        SEND_VAR                                                     $10
    8    15        DO_ICALL                                                     
   16    16      > 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/vcvbk
function name:  {closure:/in/vcvbk:10}
number of ops:  14
compiled vars:  !0 = $col, !1 = $v
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV_VARIADIC                                        !0      
          1        BIND_STATIC                                                  !1
          2        INIT_FCALL                                                   'array_sum'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $2      
          5        INIT_FCALL                                                   'array_filter'
          6        SEND_VAR                                                     !0
          7        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          8        SEND_VAL                                                     ~3
          9        DO_ICALL                                             $4      
         10        COUNT                                                ~5      $4
         11        DIV                                                  ~6      $2, ~5
         12      > RETURN                                                       ~6
         13*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vcvbk
function name:  {closure:{closure:/in/vcvbk:10}:10}
number of ops:  5
compiled vars:  !0 = $v
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
          0  E >   RECV                                                 !0      
          1        TYPE_CHECK                                        2  ~1      !0
          2        BOOL_NOT                                             ~2      ~1
          3      > RETURN                                                       ~2
          4*     > RETURN                                                       null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.75 ms | 1871 KiB | 17 Q