3v4l.org

run code in 300+ PHP versions simultaneously
<?php $functions = [function($a){return $a+1;}]; for ($i=1;$i<100000;$i++) { $f = $functions[$i-1]; $functions[$i] = function ($a) use ($f) { return $f($a); }; } $functions[$i](1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 5
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 5
Branch analysis from position: 15
Branch analysis from position: 5
filename:       /in/X8KHB
function name:  (null)
number of ops:  20
compiled vars:  !0 = $functions, !1 = $i, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FX8KHB%3A3%240'
          1        INIT_ARRAY                                       ~4      ~3
          2        ASSIGN                                                   !0, ~4
    4     3        ASSIGN                                                   !1, 1
          4      > JMP                                                      ->13
    5     5    >   SUB                                              ~7      !1, 1
          6        FETCH_DIM_R                                      ~8      !0, ~7
          7        ASSIGN                                                   !2, ~8
    6     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FX8KHB%3A6%241'
          9        BIND_LEXICAL                                             ~11, !2
         10        ASSIGN_DIM                                               !0, !1
    8    11        OP_DATA                                                  ~11
    4    12        PRE_INC                                                  !1
         13    >   IS_SMALLER                                               !1, 100000
         14      > JMPNZ                                                    ~13, ->5
   11    15    >   FETCH_DIM_R                                      ~14     !0, !1
         16        INIT_DYNAMIC_CALL                                        ~14
         17        SEND_VAL_EX                                              1
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FX8KHB%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X8KHB
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        ADD                                              ~1      !0, 1
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FX8KHB%3A3%240

Function %00%7Bclosure%7D%2Fin%2FX8KHB%3A6%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X8KHB
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    7     2        INIT_DYNAMIC_CALL                                        !1
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
    8     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FX8KHB%3A6%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.88 ms | 1399 KiB | 13 Q