3v4l.org

run code in 300+ PHP versions simultaneously
<?php $callbacks = array(); // Setup with lots of callbacks for ($i = 0; $i < 25000; $i++) { $callbacks[] = function () use ($i) { return $i; }; } foreach (array_reverse($callbacks) as $callback) { echo $callback() .PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
Branch analysis from position: 3
filename:       /in/JIe6O
function name:  (null)
number of ops:  22
compiled vars:  !0 = $callbacks, !1 = $i, !2 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->8
    7     3    >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJIe6O%3A7%240'
          4        BIND_LEXICAL                                             ~6, !1
          5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  ~6
    6     7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 25000
          9      > JMPNZ                                                    ~8, ->3
   10    10    >   INIT_FCALL                                               'array_reverse'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $9      
         13      > FE_RESET_R                                       $10     $9, ->20
         14    > > FE_FETCH_R                                               $10, !2, ->20
   11    15    >   INIT_DYNAMIC_CALL                                        !2
         16        DO_FCALL                                      0  $11     
         17        CONCAT                                           ~12     $11, '%0A'
         18        ECHO                                                     ~12
   10    19      > JMP                                                      ->14
         20    >   FE_FREE                                                  $10
   12    21      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FJIe6O%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.27 ms | 1396 KiB | 15 Q