3v4l.org

run code in 300+ PHP versions simultaneously
<?php const PERMANENT = -1; $max_ages = array_fill(0, 1000, 2345); $max_ages[500] = PERMANENT; if (in_array(PERMANENT, $max_ages)) { $max_ages = array_filter($max_ages, function ($max_age) { return $max_age !== PERMANENT; }); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/kFF5V
function name:  (null)
number of ops:  23
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                                                 1000
          4        SEND_VAL                                                 2345
          5        DO_ICALL                                         $1      
          6        ASSIGN                                                   !0, $1
    6     7        FETCH_CONSTANT                                   ~4      'PERMANENT'
          8        ASSIGN_DIM                                               !0, 500
          9        OP_DATA                                                  ~4
    8    10        INIT_FCALL                                               'in_array'
         11        FETCH_CONSTANT                                   ~5      'PERMANENT'
         12        SEND_VAL                                                 ~5
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15      > JMPZ                                                     $6, ->22
    9    16    >   INIT_FCALL                                               'array_filter'
         17        SEND_VAR                                                 !0
         18        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkFF5V%3A9%240'
   11    19        SEND_VAL                                                 ~7
         20        DO_ICALL                                         $8      
    9    21        ASSIGN                                                   !0, $8
   12    22    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FkFF5V%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kFF5V
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $max_age
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        FETCH_CONSTANT                                   ~1      'PERMANENT'
          2        IS_NOT_IDENTICAL                                 ~2      !0, ~1
          3      > RETURN                                                   ~2
   11     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkFF5V%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.26 ms | 1401 KiB | 19 Q