3v4l.org

run code in 300+ 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                                  '%00%7Bclosure%7D%2Fin%2FV1bVk%3A10%240'
          4        SEND_VAL                                                 ~2
          5        SEND_VAL                                                 1
          6        DO_ICALL                                         $3      
          7        COUNT                                            ~4      $3
          8        ECHO                                                     ~4
   12     9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FV1bVk%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1bVk
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FV1bVk%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.69 ms | 1395 KiB | 15 Q