3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ts = microtime(true); for($i = 1 ; $i <= 10000; $i++): $array[] = (substr_compare('RouterController', 'Controller', -10)); endfor; $te = microtime(true); echo '<br>' . number_format(($te - $ts), 50, ',', ' '); $ts = microtime(true); for($i = 1 ; $i <= 10000; $i++): $array[] = (substr('RouterController', -10) == 'Controller'); endfor; $te = microtime(true); echo '<br>' . number_format(($te - $ts), 50, ',', ' ');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 35
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 35
Branch analysis from position: 45
Branch analysis from position: 35
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
filename:       /in/rcsaX
function name:  (null)
number of ops:  59
compiled vars:  !0 = $ts, !1 = $i, !2 = $array, !3 = $te
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    4     4        ASSIGN                                                   !1, 1
          5      > JMP                                                      ->14
    6     6    >   INIT_FCALL                                               'substr_compare'
          7        SEND_VAL                                                 'RouterController'
          8        SEND_VAL                                                 'Controller'
          9        SEND_VAL                                                 -10
         10        DO_ICALL                                         $8      
         11        ASSIGN_DIM                                               !2
         12        OP_DATA                                                  $8
    4    13        PRE_INC                                                  !1
         14    >   IS_SMALLER_OR_EQUAL                                      !1, 10000
         15      > JMPNZ                                                    ~10, ->6
   10    16    >   INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $11     
         19        ASSIGN                                                   !3, $11
   12    20        INIT_FCALL                                               'number_format'
         21        SUB                                              ~13     !3, !0
         22        SEND_VAL                                                 ~13
         23        SEND_VAL                                                 50
         24        SEND_VAL                                                 '%2C'
         25        SEND_VAL                                                 '+'
         26        DO_ICALL                                         $14     
         27        CONCAT                                           ~15     '%3Cbr%3E', $14
         28        ECHO                                                     ~15
   14    29        INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $16     
         32        ASSIGN                                                   !0, $16
   16    33        ASSIGN                                                   !1, 1
         34      > JMP                                                      ->43
   18    35    >   INIT_FCALL                                               'substr'
         36        SEND_VAL                                                 'RouterController'
         37        SEND_VAL                                                 -10
         38        DO_ICALL                                         $20     
         39        IS_EQUAL                                         ~21     $20, 'Controller'
         40        ASSIGN_DIM                                               !2
         41        OP_DATA                                                  ~21
   16    42        PRE_INC                                                  !1
         43    >   IS_SMALLER_OR_EQUAL                                      !1, 10000
         44      > JMPNZ                                                    ~23, ->35
   22    45    >   INIT_FCALL                                               'microtime'
         46        SEND_VAL                                                 <true>
         47        DO_ICALL                                         $24     
         48        ASSIGN                                                   !3, $24
   24    49        INIT_FCALL                                               'number_format'
         50        SUB                                              ~26     !3, !0
         51        SEND_VAL                                                 ~26
         52        SEND_VAL                                                 50
         53        SEND_VAL                                                 '%2C'
         54        SEND_VAL                                                 '+'
         55        DO_ICALL                                         $27     
         56        CONCAT                                           ~28     '%3Cbr%3E', $27
         57        ECHO                                                     ~28
         58      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.83 ms | 1400 KiB | 21 Q