3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 147 => [ "pts_m" => "", "pts_mreg" => 1, "pts_cg" => 1 ], 158 => [ "pts_m" => null , "pts_mreg" => null, "pts_cg" => 0 ], 159 => [ "pts_m" => "", "pts_mreg" => 1, "pts_cg" => 1 ] ]; var_export( array_sum( array_map( fn($row) => count(array_filter($row)), $array ) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ag69i
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'var_export'
   22     2        INIT_FCALL                                               'array_sum'
   23     3        INIT_FCALL                                               'array_map'
   24     4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          5        SEND_VAL                                                 ~2
   25     6        SEND_VAR                                                 !0
   23     7        DO_ICALL                                         $3      
   25     8        SEND_VAR                                                 $3
   22     9        DO_ICALL                                         $4      
   25    10        SEND_VAR                                                 $4
   21    11        DO_ICALL                                                 
   28    12      > 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/Ag69i
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        COUNT                                            ~2      $1
          5      > RETURN                                                   ~2
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.98 ms | 1003 KiB | 17 Q