3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = base64_encode(md5('')); $start = microtime(true); for ($i = 0; $i < 100; ++$i) { $result = []; $value = $text; do { $result[] = $value; $value = substr($value, 0, -1); } while ('' !== $value); } $end = microtime(true); echo $i/($end - $start), ' op/s', PHP_EOL; var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 13
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 15
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 13
Branch analysis from position: 28
Branch analysis from position: 13
Branch analysis from position: 15
filename:       /in/c9rnI
function name:  (null)
number of ops:  41
compiled vars:  !0 = $text, !1 = $start, !2 = $i, !3 = $result, !4 = $value, !5 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'base64_encode'
          1        INIT_FCALL                                               'md5'
          2        SEND_VAL                                                 ''
          3        DO_ICALL                                         $6      
          4        SEND_VAR                                                 $6
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !0, $7
    4     7        INIT_FCALL                                               'microtime'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !1, $9
    5    11        ASSIGN                                                   !2, 0
         12      > JMP                                                      ->26
    6    13    >   ASSIGN                                                   !3, <array>
    7    14        ASSIGN                                                   !4, !0
    9    15    >   ASSIGN_DIM                                               !3
         16        OP_DATA                                                  !4
   10    17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !4
         19        SEND_VAL                                                 0
         20        SEND_VAL                                                 -1
         21        DO_ICALL                                         $15     
         22        ASSIGN                                                   !4, $15
   11    23        IS_NOT_IDENTICAL                                         !4, ''
         24      > JMPNZ                                                    ~17, ->15
    5    25    >   PRE_INC                                                  !2
         26    >   IS_SMALLER                                               !2, 100
         27      > JMPNZ                                                    ~19, ->13
   14    28    >   INIT_FCALL                                               'microtime'
         29        SEND_VAL                                                 <true>
         30        DO_ICALL                                         $20     
         31        ASSIGN                                                   !5, $20
   15    32        SUB                                              ~22     !5, !1
         33        DIV                                              ~23     !2, ~22
         34        ECHO                                                     ~23
         35        ECHO                                                     '+op%2Fs'
         36        ECHO                                                     '%0A'
   16    37        INIT_FCALL                                               'var_dump'
         38        SEND_VAR                                                 !3
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.07 ms | 1400 KiB | 23 Q