3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startMemory = memory_get_usage(); $array = range(1, 100000); foreach($array as $arr){ if($k%100 == 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 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
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/IpmGF
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
    4     3        INIT_FCALL                                               'range'
          4        SEND_VAL                                                 1
          5        SEND_VAL                                                 100000
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    6     8      > FE_RESET_R                                       $8      !1, ->19
          9    > > FE_FETCH_R                                               $8, !2, ->19
    7    10    >   MOD                                              ~9      !3, 100
         11        IS_EQUAL                                                 ~9, 0
         12      > JMPZ                                                     ~10, ->18
    8    13    >   INIT_FCALL                                               'memory_get_usage'
         14        DO_ICALL                                         $11     
         15        SUB                                              ~12     $11, !0
         16        ECHO                                                     ~12
         17        ECHO                                                     '+bytes'
    6    18    > > JMP                                                      ->9
         19    >   FE_FREE                                                  $8
   12    20        INIT_FCALL                                               'memory_get_usage'
         21        DO_ICALL                                         $13     
         22        SUB                                              ~14     $13, !0
         23        CONCAT                                           ~15     'Finnally', ~14
         24        ECHO                                                     ~15
         25        ECHO                                                     '+bytes'
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.84 ms | 1396 KiB | 17 Q