3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.11 ms | 1400 KiB | 25 Q