3v4l.org

run code in 300+ 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 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 9
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
2 jumps found. (Code = 44) Position 1 = 58, Position 2 = 40
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 58, Position 2 = 40
Branch analysis from position: 58
Branch analysis from position: 40
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 9
Branch analysis from position: 27
Branch analysis from position: 9
filename:       /in/kaR8b
function name:  (null)
number of ops:  66
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                                                      ->25
   11     9    >   INIT_FCALL                                               'base_convert'
         10        INIT_FCALL                                               'substr'
         11        INIT_FCALL                                               'md5'
         12        CONCAT                                           ~11     !0, !1
         13        SEND_VAL                                                 ~11
         14        DO_ICALL                                         $12     
         15        SEND_VAR                                                 $12
         16        SEND_VAL                                                 -4
         17        DO_ICALL                                         $13     
         18        SEND_VAR                                                 $13
         19        SEND_VAL                                                 16
         20        SEND_VAL                                                 10
         21        DO_ICALL                                         $14     
         22        MUL                                              ~15     $14, 1.0e-5
         23        FREE                                                     ~15
   12    24        PRE_DEC                                                  !3
   10    25    >   IS_SMALLER                                               0, !3
         26      > JMPNZ                                                    ~17, ->9
   15    27    >   INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'hrtime'
         29        SEND_VAL                                                 1
         30        DO_ICALL                                         $18     
         31        SUB                                              ~19     $18, !4
         32        SEND_VAL                                                 ~19
         33        DO_ICALL                                                 
   17    34        ASSIGN                                                   !3, !2
   18    35        INIT_FCALL                                               'hrtime'
         36        SEND_VAL                                                 1
         37        DO_ICALL                                         $22     
         38        ASSIGN                                                   !4, $22
   20    39      > JMP                                                      ->56
   21    40    >   INIT_FCALL                                               'substr'
         41        INIT_FCALL                                               'base_convert'
         42        INIT_FCALL                                               'md5'
         43        CONCAT                                           ~24     !0, !1
         44        SEND_VAL                                                 ~24
         45        DO_ICALL                                         $25     
         46        SEND_VAR                                                 $25
         47        SEND_VAL                                                 16
         48        SEND_VAL                                                 10
         49        DO_ICALL                                         $26     
         50        SEND_VAR                                                 $26
         51        SEND_VAL                                                 -5
         52        DO_ICALL                                         $27     
         53        MUL                                              ~28     $27, 1.0e-5
         54        FREE                                                     ~28
   22    55        PRE_DEC                                                  !3
   20    56    >   IS_SMALLER                                               0, !3
         57      > JMPNZ                                                    ~30, ->40
   25    58    >   INIT_FCALL                                               'var_dump'
         59        INIT_FCALL                                               'hrtime'
         60        SEND_VAL                                                 1
         61        DO_ICALL                                         $31     
         62        SUB                                              ~32     $31, !4
         63        SEND_VAL                                                 ~32
         64        DO_ICALL                                                 
         65      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.85 ms | 963 KiB | 18 Q