3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getIntegerIdsFilter($acceptZeroes = false) { return function ($ids) use ($acceptZeroes) { $filteredIds = []; foreach ((array) $ids as $id) { if (is_scalar($id) && ((int) $id || $acceptZeroes)) { var_dump($id); var_dump((int) $id); $filteredIds[] = $id; } } return $filteredIds; }; } $callback = getIntegerIdsFilter(); $callback(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RJV4M
function name:  (null)
number of ops:  7
compiled vars:  !0 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'getintegeridsfilter'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   21     3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function getintegeridsfilter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RJV4M
function name:  getIntegerIdsFilter
number of ops:  5
compiled vars:  !0 = $acceptZeroes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <false>
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRJV4M%3A5%240'
          2        BIND_LEXICAL                                             ~1, !0
   17     3      > RETURN                                                   ~1
   18     4*     > RETURN                                                   null

End of function getintegeridsfilter

Function %00%7Bclosure%7D%2Fin%2FRJV4M%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 23
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 23
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 22
Branch analysis from position: 11
Branch analysis from position: 12
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/RJV4M
function name:  {closure}
number of ops:  26
compiled vars:  !0 = $ids, !1 = $acceptZeroes, !2 = $filteredIds, !3 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    7     2        ASSIGN                                                   !2, <array>
    8     3        CAST                                          7  ~5      !0
          4      > FE_RESET_R                                       $6      ~5, ->23
          5    > > FE_FETCH_R                                               $6, !3, ->23
    9     6    >   TYPE_CHECK                                  124  ~7      !3
          7      > JMPZ_EX                                          ~7      ~7, ->12
          8    >   CAST                                          4  ~8      !3
          9      > JMPNZ_EX                                         ~8      ~8, ->11
         10    >   BOOL                                             ~8      !1
         11    >   BOOL                                             ~7      ~8
         12    > > JMPZ                                                     ~7, ->22
   10    13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
   11    16        INIT_FCALL                                               'var_dump'
         17        CAST                                          4  ~10     !3
         18        SEND_VAL                                                 ~10
         19        DO_ICALL                                                 
   12    20        ASSIGN_DIM                                               !2
         21        OP_DATA                                                  !3
    8    22    > > JMP                                                      ->5
         23    >   FE_FREE                                                  $6
   16    24      > RETURN                                                   !2
   17    25*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.36 ms | 1403 KiB | 19 Q