3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.42 ms | 1400 KiB | 25 Q