3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = array( array('DOS' => 'Apr 2 2013', 'Name' => 'Abc Starling', 'No' => 15616286, 'Duration' => 135), array('DOS' => 'Apr 2 2013', 'Name' => 'Cde Starling', 'No' => 15616286, 'Duration' => 585), array('DOS' => 'Apr 3 2013', 'Name' => 'Sdf Starling', 'No' => 15616286, 'Duration' => 123), array('DOS' => 'Apr 3 2013', 'Name' => 'Sdc Starling', 'No' => 15616286, 'Duration' => 456), array('DOS' => 'Apr 4 2013', 'Name' => 'Fcd Starling', 'No' => 15616286, 'Duration' => 789), array('DOS' => 'Apr 4 2013', 'Name' => 'Rfd Starling', 'No' => 15616286, 'Duration' => 906), array('DOS' => 'Apr 5 2013', 'Name' => 'Vfd Starling', 'No' => 15616286, 'Duration' => 567), array('DOS' => 'Apr 6 2013', 'Name' => 'Gfr Starling', 'No' => 15616286, 'Duration' => 456), array('DOS' => 'Apr 6 2013', 'Name' => 'Dvh Starling', 'No' => 15616286, 'Duration' => 343) ); $cond="Apr 3 2013"; $result=array_filter($source,function($v)use($cond){ return $v["DOS"]==$cond; }); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K8kDV
function name:  (null)
number of ops:  13
compiled vars:  !0 = $source, !1 = $cond, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, 'Apr+3+2013'
   14     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FK8kDV%3A14%240'
          5        BIND_LEXICAL                                             ~5, !1
   16     6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
   14     8        ASSIGN                                                   !2, $6
   17     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FK8kDV%3A14%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K8kDV
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $v, !1 = $cond
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   15     2        FETCH_DIM_R                                      ~2      !0, 'DOS'
          3        IS_EQUAL                                         ~3      !1, ~2
          4      > RETURN                                                   ~3
   16     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FK8kDV%3A14%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.38 ms | 1395 KiB | 17 Q