3v4l.org

run code in 300+ PHP versions simultaneously
<?php $newArray = array ( 0 => 0.393, 1 => 0.769, 2 => 0.189, 3 => 0, 4 => 0, 5 => 0.349, 6 => 0.686, 7 => 0.168, 8 => 0, 9 => 0, 10 => 0.272, 11 => 0.534, 12 => 0.131, 13 => 1, 14 => 0 ); $newArray = array_filter($newArray, function ($k) { return $k % 5 < 3; }, ARRAY_FILTER_USE_KEY ); print_r($newArray); $newArray = array_values($newArray); print_r($newArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fJake
function name:  (null)
number of ops:  19
compiled vars:  !0 = $newArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        SEND_VAL                                                 ~2
          5        SEND_VAL                                                 2
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
   22     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   23    11        INIT_FCALL                                               'array_values'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        ASSIGN                                                   !0, $6
   24    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > 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/fJake
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        MOD                                              ~1      !0, 5
          2        IS_SMALLER                                       ~2      ~1, 3
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.56 ms | 1000 KiB | 16 Q