3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = range(1, 10000); $start_time = microtime(true); $start_memory = memory_get_peak_usage(true); foreach($array AS &$value){ $value = 'foo'; } $end_time = microtime(true); $end_memory = memory_get_peak_usage(true); echo "Time: " . ($end_time - $start_time) . PHP_EOL; echo "Memory: " . ($end_memory - $start_memory) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 126) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/k9NPp
function name:  (null)
number of ops:  35
compiled vars:  !0 = $array, !1 = $start_time, !2 = $start_memory, !3 = $value, !4 = $end_time, !5 = $end_memory
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'range'
          1        SEND_VAL                                                     1
          2        SEND_VAL                                                     10000
          3        DO_ICALL                                             $6      
          4        ASSIGN                                                       !0, $6
    4     5        INIT_FCALL                                                   'microtime'
          6        SEND_VAL                                                     <true>
          7        DO_ICALL                                             $8      
          8        ASSIGN                                                       !1, $8
    5     9        INIT_FCALL                                                   'memory_get_peak_usage'
         10        SEND_VAL                                                     <true>
         11        DO_ICALL                                             $10     
         12        ASSIGN                                                       !2, $10
    7    13      > FE_RESET_RW                                          $12     !0, ->17
         14    > > FE_FETCH_RW                                                  $12, !3, ->17
    8    15    >   ASSIGN                                                       !3, 'foo'
    7    16      > JMP                                                          ->14
         17    >   FE_FREE                                                      $12
   11    18        INIT_FCALL                                                   'microtime'
         19        SEND_VAL                                                     <true>
         20        DO_ICALL                                             $14     
         21        ASSIGN                                                       !4, $14
   12    22        INIT_FCALL                                                   'memory_get_peak_usage'
         23        SEND_VAL                                                     <true>
         24        DO_ICALL                                             $16     
         25        ASSIGN                                                       !5, $16
   14    26        SUB                                                  ~18     !4, !1
         27        CONCAT                                               ~19     'Time%3A+', ~18
         28        CONCAT                                               ~20     ~19, '%0A'
         29        ECHO                                                         ~20
   16    30        SUB                                                  ~21     !5, !2
         31        CONCAT                                               ~22     'Memory%3A+', ~21
         32        CONCAT                                               ~23     ~22, '%0A'
         33        ECHO                                                         ~23
         34      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.72 ms | 1825 KiB | 11 Q