3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('memory_limit', 2048); register_shutdown_function(function () { $y = []; for ($i = 0; $i < 1000; $i++) { $y[] = $i; } var_dump([ 'total count is' => count($y) ]); }); $x = []; for ($i = 0; $i < 1000000000; $i++) { $x[] = $i; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 11
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 11
Branch analysis from position: 16
Branch analysis from position: 11
filename:       /in/bXMlX
function name:  (null)
number of ops:  17
compiled vars:  !0 = $x, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'memory_limit'
          2        SEND_VAL                                                 2048
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'register_shutdown_function'
          5        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   10     6        SEND_VAL                                                 ~3
    4     7        DO_ICALL                                                 
   12     8        ASSIGN                                                   !0, <array>
   13     9        ASSIGN                                                   !1, 0
         10      > JMP                                                      ->14
   14    11    >   ASSIGN_DIM                                               !0
         12        OP_DATA                                                  !1
   13    13        PRE_INC                                                  !1
         14    >   IS_SMALLER                                               !1, 1000000000
         15      > JMPNZ                                                    ~9, ->11
   15    16    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/bXMlX
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $y, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
    7     3    >   ASSIGN_DIM                                               !0
          4        OP_DATA                                                  !1
    6     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 1000
          7      > JMPNZ                                                    ~6, ->3
    9     8    >   INIT_FCALL                                               'var_dump'
          9        COUNT                                            ~7      !0
         10        INIT_ARRAY                                       ~8      ~7, 'total+count+is'
         11        SEND_VAL                                                 ~8
         12        DO_ICALL                                                 
   10    13      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.7 ms | 1448 KiB | 16 Q