3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = [ ["name" => "Martin", "type" => "0"], ["name" => "Jack", "type" => "0"], ["name" => "Tiam", "type" => "1"] ]; echo count(array_filter($arr, function($v, $k){ return $v['type'] == 1; },ARRAY_FILTER_USE_BOTH)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1bVk
function name:  (null)
number of ops:  10
compiled vars:  !0 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   10     1        INIT_FCALL                                                   'array_filter'
          2        SEND_VAR                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          4        SEND_VAL                                                     ~2
          5        SEND_VAL                                                     1
          6        DO_ICALL                                             $3      
          7        COUNT                                                ~4      $3
          8        ECHO                                                         ~4
   12     9      > 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/V1bVk
function name:  {closure:/in/V1bVk:10}
number of ops:  6
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        FETCH_DIM_R                                          ~2      !0, 'type'
          3        IS_EQUAL                                             ~3      ~2, 1
          4      > RETURN                                                       ~3
          5*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
142.84 ms | 2091 KiB | 14 Q