3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { $run = eval('return function(){};'); } echo "0 ", number_format(memory_get_usage())."\n"; for ($i = 0; $i <= 100000; $i++) { test(); if (strlen(rtrim($i, "0")) == 1) { echo str_pad($i,6), " ", number_format(memory_get_usage())."\n"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 10
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 32
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 10
Branch analysis from position: 35
Branch analysis from position: 10
Branch analysis from position: 32
filename:       /in/UHpPC
function name:  (null)
number of ops:  36
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     '0++++++'
          1        INIT_FCALL                                               'number_format'
          2        INIT_FCALL                                               'memory_get_usage'
          3        DO_ICALL                                         $1      
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                         $2      
          6        CONCAT                                           ~3      $2, '%0A'
          7        ECHO                                                     ~3
    8     8        ASSIGN                                                   !0, 0
          9      > JMP                                                      ->33
    9    10    >   INIT_FCALL                                               'test'
         11        DO_FCALL                                      0          
   10    12        INIT_FCALL                                               'rtrim'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 '0'
         15        DO_ICALL                                         $6      
         16        STRLEN                                           ~7      $6
         17        IS_EQUAL                                                 ~7, 1
         18      > JMPZ                                                     ~8, ->32
   11    19    >   INIT_FCALL                                               'str_pad'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 6
         22        DO_ICALL                                         $9      
         23        ECHO                                                     $9
         24        ECHO                                                     '+'
         25        INIT_FCALL                                               'number_format'
         26        INIT_FCALL                                               'memory_get_usage'
         27        DO_ICALL                                         $10     
         28        SEND_VAR                                                 $10
         29        DO_ICALL                                         $11     
         30        CONCAT                                           ~12     $11, '%0A'
         31        ECHO                                                     ~12
    8    32    >   PRE_INC                                                  !0
         33    >   IS_SMALLER_OR_EQUAL                                      !0, 100000
         34      > JMPNZ                                                    ~14, ->10
   13    35    > > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UHpPC
function name:  test
number of ops:  3
compiled vars:  !0 = $run
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INCLUDE_OR_EVAL                                  $1      'return+function%28%29%7B%7D%3B', EVAL
          1        ASSIGN                                                   !0, $1
    5     2      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.41 ms | 1403 KiB | 22 Q