3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i=0; $i<10; ++$i) { $reader = new XMLReader(); $reader->xml('<?xml version="1.0" encoding="utf-8"?><id>1234567890</id>'); while ($reader->read()) { } echo memory_get_peak_usage(true) . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 9
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 2
Branch analysis from position: 20
Branch analysis from position: 2
Branch analysis from position: 9
filename:       /in/5fl7A
function name:  (null)
number of ops:  21
compiled vars:  !0 = $i, !1 = $reader
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->18
    3     2    >   NEW                                              $3      'XMLReader'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
    4     5        INIT_METHOD_CALL                                         !1, 'xml'
          6        SEND_VAL_EX                                              '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E%3Cid%3E1234567890%3C%2Fid%3E'
          7        DO_FCALL                                      0          
    5     8      > JMP                                                      ->9
          9    >   INIT_METHOD_CALL                                         !1, 'read'
         10        DO_FCALL                                      0  $7      
         11      > JMPNZ                                                    $7, ->9
    8    12    >   INIT_FCALL                                               'memory_get_peak_usage'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $8      
         15        CONCAT                                           ~9      $8, '%0A'
         16        ECHO                                                     ~9
    2    17        PRE_INC                                                  !0
         18    >   IS_SMALLER                                               !0, 10
         19      > JMPNZ                                                    ~11, ->2
    9    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.21 ms | 1400 KiB | 15 Q