3v4l.org

run code in 500+ PHP versions simultaneously
<?php const PERMANENT = -1; $max_ages = array_fill(0, 10, 2345); $max_ages[5] = PERMANENT; $max_ages = array_filter($max_ages, function ($max_age) { return $max_age !== PERMANENT; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vs4vA
function name:  (null)
number of ops:  17
compiled vars:  !0 = $max_ages
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                                'PERMANENT', -1
    5     1        INIT_FCALL                                                   'array_fill'
          2        SEND_VAL                                                     0
          3        SEND_VAL                                                     10
          4        SEND_VAL                                                     2345
          5        DO_ICALL                                             $1      
          6        ASSIGN                                                       !0, $1
    6     7        FETCH_CONSTANT                                       ~4      'PERMANENT'
          8        ASSIGN_DIM                                                   !0, 5
          9        OP_DATA                                                      ~4
    8    10        INIT_FCALL                                                   'array_filter'
         11        SEND_VAR                                                     !0
         12        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
   10    13        SEND_VAL                                                     ~5
    8    14        DO_ICALL                                             $6      
         15        ASSIGN                                                       !0, $6
   10    16      > 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/vs4vA
function name:  {closure:/in/vs4vA:8}
number of ops:  5
compiled vars:  !0 = $max_age
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
    9     1        FETCH_CONSTANT                                       ~1      'PERMANENT'
          2        IS_NOT_IDENTICAL                                     ~2      !0, ~1
          3      > RETURN                                                       ~2
   10     4*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
194.98 ms | 2679 KiB | 15 Q