3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startMemory = memory_get_usage(); $array = range(1, 100000); foreach($array as $arr){ echo memory_get_usage() - $startMemory, ' bytes'; } echo 'Finnally' . memory_get_usage() - $startMemory, ' bytes';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/jZvTQ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $startMemory, !1 = $array, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'memory_get_usage'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    4     3        INIT_FCALL                                               'range'
          4        SEND_VAL                                                 1
          5        SEND_VAL                                                 100000
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    6     8      > FE_RESET_R                                       $7      !1, ->16
          9    > > FE_FETCH_R                                               $7, !2, ->16
    7    10    >   INIT_FCALL                                               'memory_get_usage'
         11        DO_ICALL                                         $8      
         12        SUB                                              ~9      $8, !0
         13        ECHO                                                     ~9
         14        ECHO                                                     '+bytes'
    6    15      > JMP                                                      ->9
         16    >   FE_FREE                                                  $7
   10    17        INIT_FCALL                                               'memory_get_usage'
         18        DO_ICALL                                         $10     
         19        SUB                                              ~11     $10, !0
         20        CONCAT                                           ~12     'Finnally', ~11
         21        ECHO                                                     ~12
         22        ECHO                                                     '+bytes'
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.76 ms | 1395 KiB | 17 Q