3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrays = [ [ ['A' => 'aaaaa'], ['A' => null], ['A' => null], ['A' => (float)666] ] ]; $arrays = array_map(function($x) { return array_filter($x, function($y) { return is_float($y['A']) || is_string($y['A']); }); }, $arrays); var_dump($arrays);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7tg81
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arrays
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_ARRAY                                       ~1      <array>
          1        ADD_ARRAY_ELEMENT                                ~1      <array>
          2        ADD_ARRAY_ELEMENT                                ~1      <array>
    8     3        CAST                                          5  ~2      666
          4        INIT_ARRAY                                       ~3      ~2, 'A'
          5        ADD_ARRAY_ELEMENT                                ~1      ~3
          6        INIT_ARRAY                                       ~4      ~1
    3     7        ASSIGN                                                   !0, ~4
   12     8        INIT_FCALL                                               'array_map'
          9        DECLARE_LAMBDA_FUNCTION                          ~6      [0]
   16    10        SEND_VAL                                                 ~6
         11        SEND_VAR                                                 !0
   12    12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !0, $7
   18    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
         17      > 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/7tg81
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
   15     4        SEND_VAL                                                 ~1
   13     5        DO_ICALL                                         $2      
   15     6      > RETURN                                                   $2
   16     7*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/7tg81
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        FETCH_DIM_R                                      ~1      !0, 'A'
          2        TYPE_CHECK                                   32  ~2      ~1
          3      > JMPNZ_EX                                         ~2      ~2, ->7
          4    >   FETCH_DIM_R                                      ~3      !0, 'A'
          5        TYPE_CHECK                                   64  ~4      ~3
          6        BOOL                                             ~2      ~4
          7    > > RETURN                                                   ~2
   15     8*     > RETURN                                                   null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.88 ms | 1017 KiB | 16 Q