3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 28; $ranges = [[3, 10], [2, 20], [1, 30]]; $r = array_filter($ranges, function($a) use ($i){ return $a[0] < $i && $i < $a[1]; }); var_dump($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BMGu0
function name:  (null)
number of ops:  13
compiled vars:  !0 = $i, !1 = $ranges, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 28
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !1
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBMGu0%3A5%240'
          5        BIND_LEXICAL                                             ~5, !0
    7     6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
    5     8        ASSIGN                                                   !2, $6
    8     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBMGu0%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/BMGu0
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $a, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    6     2        FETCH_DIM_R                                      ~2      !0, 0
          3        IS_SMALLER                                       ~3      ~2, !1
          4      > JMPZ_EX                                          ~3      ~3, ->8
          5    >   FETCH_DIM_R                                      ~4      !0, 1
          6        IS_SMALLER                                       ~5      !1, ~4
          7        BOOL                                             ~3      ~5
          8    > > RETURN                                                   ~3
    7     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBMGu0%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.73 ms | 1395 KiB | 17 Q