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); } $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 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 13
Branch analysis from position: 27
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 = 27, Position 2 = 13
Branch analysis from position: 27
Branch analysis from position: 13
Branch analysis from position: 14
filename:       /in/ZHJoo
function name:  (null)
number of ops:  40
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                                                      ->25
    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
    5    24    >   PRE_INC                                                  !2
         25    >   IS_SMALLER                                               !2, 100
         26      > JMPNZ                                                    ~17, ->13
   13    27    >   INIT_FCALL                                               'microtime'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $18     
         30        ASSIGN                                                   !4, $18
   14    31        SUB                                              ~20     !4, !1
         32        DIV                                              ~21     !2, ~20
         33        ECHO                                                     ~21
         34        ECHO                                                     '+op%2Fs'
         35        ECHO                                                     '%0A'
   15    36        INIT_FCALL                                               'var_dump'
         37        SEND_VAR                                                 !3
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.97 ms | 1400 KiB | 23 Q