3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(array('name' => 'Artikkel #1', 'time' => 10), array('name' => 'Artikkel #2', 'time' => 5), array('name' => 'Artikkel #3', 'time' => 20)); // Filter out articles where time is under 10 (<10) $result = array_filter($array, function($var){ if ($var['time'] < 10) return false; return true; }); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lMUCN
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FlMUCN%3A6%240'
   11     4        SEND_VAL                                                 ~3
          5        DO_ICALL                                         $4      
    6     6        ASSIGN                                                   !1, $4
   13     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FlMUCN%3A6%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lMUCN
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        FETCH_DIM_R                                      ~1      !0, 'time'
          2        IS_SMALLER                                               ~1, 10
          3      > JMPZ                                                     ~2, ->5
    8     4    > > RETURN                                                   <false>
   10     5    > > RETURN                                                   <true>
   11     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FlMUCN%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.81 ms | 1395 KiB | 17 Q