3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = <<<'EOT' <?php $a = function(){}; unset($a); EOT; $file = tempnam(sys_get_temp_dir(), 'a'); file_put_contents($file, $code); echo "0 ", number_format(memory_get_usage())."\n"; for ($i = 0; $i <= 50000; $i++) { include $file; 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 = 44
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 46, Position 2 = 22
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 43
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 46, Position 2 = 22
Branch analysis from position: 46
Branch analysis from position: 22
Branch analysis from position: 43
filename:       /in/fPhlU
function name:  (null)
number of ops:  47
compiled vars:  !0 = $code, !1 = $file, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fphp%0A%24a+%3D+function%28%29%7B%7D%3B%0Aunset%28%24a%29%3B'
    8     1        INIT_FCALL                                               'tempnam'
          2        INIT_FCALL                                               'sys_get_temp_dir'
          3        DO_ICALL                                         $4      
          4        SEND_VAR                                                 $4
          5        SEND_VAL                                                 'a'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    9     8        INIT_FCALL                                               'file_put_contents'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   12    12        ECHO                                                     '0++++++'
         13        INIT_FCALL                                               'number_format'
         14        INIT_FCALL                                               'memory_get_usage'
         15        DO_ICALL                                         $8      
         16        SEND_VAR                                                 $8
         17        DO_ICALL                                         $9      
         18        CONCAT                                           ~10     $9, '%0A'
         19        ECHO                                                     ~10
   13    20        ASSIGN                                                   !2, 0
         21      > JMP                                                      ->44
   14    22    >   INCLUDE_OR_EVAL                                          !1, INCLUDE
   15    23        INIT_FCALL                                               'rtrim'
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 '0'
         26        DO_ICALL                                         $13     
         27        STRLEN                                           ~14     $13
         28        IS_EQUAL                                                 ~14, 1
         29      > JMPZ                                                     ~15, ->43
   16    30    >   INIT_FCALL                                               'str_pad'
         31        SEND_VAR                                                 !2
         32        SEND_VAL                                                 6
         33        DO_ICALL                                         $16     
         34        ECHO                                                     $16
         35        ECHO                                                     '+'
         36        INIT_FCALL                                               'number_format'
         37        INIT_FCALL                                               'memory_get_usage'
         38        DO_ICALL                                         $17     
         39        SEND_VAR                                                 $17
         40        DO_ICALL                                         $18     
         41        CONCAT                                           ~19     $18, '%0A'
         42        ECHO                                                     ~19
   13    43    >   PRE_INC                                                  !2
         44    >   IS_SMALLER_OR_EQUAL                                      !2, 50000
         45      > JMPNZ                                                    ~21, ->22
   18    46    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.92 ms | 1392 KiB | 27 Q