3v4l.org

run code in 500+ PHP versions simultaneously
<?php $menu_slug = "pens-and-pencils"; $menu_title = "Pens and Pencils"; $tests = 10000; $loop = $tests; $a = hrtime(1); while ($loop > 0 ) { base_convert( substr( md5( $menu_slug . $menu_title ), -4 ), 16, 10 ) * 0.00001; $loop--; } var_dump( hrtime(1) - $a ); $loop = $tests; $a = hrtime(1); while ($loop > 0 ) { substr( base_convert( md5( $menu_slug . $menu_title ), 16, 10 ), -5 ) * 0.00001; $loop--; } var_dump( hrtime(1) - $a );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 9
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 37
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 37
Branch analysis from position: 52
Branch analysis from position: 37
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 9
Branch analysis from position: 24
Branch analysis from position: 9
filename:       /in/kaR8b
function name:  (null)
number of ops:  60
compiled vars:  !0 = $menu_slug, !1 = $menu_title, !2 = $tests, !3 = $loop, !4 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'pens-and-pencils'
    4     1        ASSIGN                                                       !1, 'Pens+and+Pencils'
    5     2        ASSIGN                                                       !2, 10000
    7     3        ASSIGN                                                       !3, !2
    8     4        INIT_FCALL                                                   'hrtime'
          5        SEND_VAL                                                     1
          6        DO_ICALL                                             $9      
          7        ASSIGN                                                       !4, $9
   10     8      > JMP                                                          ->22
   11     9    >   INIT_FCALL                                                   'base_convert'
         10        INIT_FCALL                                                   'md5'
         11        CONCAT                                               ~11     !0, !1
         12        SEND_VAL                                                     ~11
         13        DO_ICALL                                             $12     
         14        FRAMELESS_ICALL_2                substr              ~13     $12, -4
         15        SEND_VAL                                                     ~13
         16        SEND_VAL                                                     16
         17        SEND_VAL                                                     10
         18        DO_ICALL                                             $14     
         19        MUL                                                  ~15     $14, 1.0e-5
         20        FREE                                                         ~15
   12    21        PRE_DEC                                                      !3
   10    22    >   IS_SMALLER                                                   0, !3
         23      > JMPNZ                                                        ~17, ->9
   15    24    >   INIT_FCALL                                                   'var_dump'
         25        INIT_FCALL                                                   'hrtime'
         26        SEND_VAL                                                     1
         27        DO_ICALL                                             $18     
         28        SUB                                                  ~19     $18, !4
         29        SEND_VAL                                                     ~19
         30        DO_ICALL                                                     
   17    31        ASSIGN                                                       !3, !2
   18    32        INIT_FCALL                                                   'hrtime'
         33        SEND_VAL                                                     1
         34        DO_ICALL                                             $22     
         35        ASSIGN                                                       !4, $22
   20    36      > JMP                                                          ->50
   21    37    >   INIT_FCALL                                                   'base_convert'
         38        INIT_FCALL                                                   'md5'
         39        CONCAT                                               ~24     !0, !1
         40        SEND_VAL                                                     ~24
         41        DO_ICALL                                             $25     
         42        SEND_VAR                                                     $25
         43        SEND_VAL                                                     16
         44        SEND_VAL                                                     10
         45        DO_ICALL                                             $26     
         46        FRAMELESS_ICALL_2                substr              ~27     $26, -5
         47        MUL                                                  ~28     ~27, 1.0e-5
         48        FREE                                                         ~28
   22    49        PRE_DEC                                                      !3
   20    50    >   IS_SMALLER                                                   0, !3
         51      > JMPNZ                                                        ~30, ->37
   25    52    >   INIT_FCALL                                                   'var_dump'
         53        INIT_FCALL                                                   'hrtime'
         54        SEND_VAL                                                     1
         55        DO_ICALL                                             $31     
         56        SUB                                                  ~32     $31, !4
         57        SEND_VAL                                                     ~32
         58        DO_ICALL                                                     
         59      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.33 ms | 1484 KiB | 19 Q