3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = ''; for ($i = 0; $i < 1e4; $i++) { $str .= md5(time()); } echo strlen($str); $memory = memory_get_usage(true); substr($str, 0); echo memory_get_usage(true)-$memory;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
Branch analysis from position: 3
filename:       /in/YkXEZ
function name:  (null)
number of ops:  28
compiled vars:  !0 = $str, !1 = $i, !2 = $memory
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, ''
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->10
    4     3    >   INIT_FCALL                                               'md5'
          4        INIT_FCALL                                               'time'
          5        DO_ICALL                                         $5      
          6        SEND_VAR                                                 $5
          7        DO_ICALL                                         $6      
          8        ASSIGN_OP                                     8          !0, $6
    3     9        PRE_INC                                                  !1
         10    >   IS_SMALLER                                               !1, 10000
         11      > JMPNZ                                                    ~9, ->3
    7    12    >   STRLEN                                           ~10     !0
         13        ECHO                                                     ~10
    9    14        INIT_FCALL                                               'memory_get_usage'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !2, $11
   10    18        INIT_FCALL                                               'substr'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 0
         21        DO_ICALL                                                 
   11    22        INIT_FCALL                                               'memory_get_usage'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $14     
         25        SUB                                              ~15     $14, !2
         26        ECHO                                                     ~15
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.77 ms | 1400 KiB | 21 Q