3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.8 ms | 1396 KiB | 17 Q