3v4l.org

run code in 500+ PHP versions simultaneously
<?php $ids = [1, 2, 'string']; array_filter($ids, function ($id) { $pass = is_numeric($id) && $id == (int) $id; assert($pass, $id . ' is not an integer'); return $pass; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7dae2
function name:  (null)
number of ops:  7
compiled vars:  !0 = $ids
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    5     1        INIT_FCALL                                                   'array_filter'
          2        SEND_VAR                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
    9     4        SEND_VAL                                                     ~2
    5     5        DO_ICALL                                                     
    9     6      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/7dae2
function name:  {closure:/in/7dae2:5}
number of ops:  15
compiled vars:  !0 = $id, !1 = $pass
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    6     1        FRAMELESS_ICALL_1                is_numeric          ~2      !0
          2      > JMPZ_EX                                              ~2      ~2, ->6
          3    >   CAST                                              4  ~3      !0
          4        IS_EQUAL                                             ~4      !0, ~3
          5        BOOL                                                 ~2      ~4
          6    >   ASSIGN                                                       !1, ~2
    7     7        ASSERT_CHECK                                                 
          8        INIT_FCALL                                                   'assert'
          9        SEND_VAR                                                     !1
         10        CONCAT                                               ~6      !0, '+is+not+an+integer'
         11        SEND_VAL                                                     ~6
         12        DO_ICALL                                                     
    8    13      > RETURN                                                       !1
    9    14*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.59 ms | 480 KiB | 9 Q