3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = microtime(true); for ($i = 0; $i < 1000; $i++) echo strtr('React/Controller/Website/User', '/', '_') . "\n"; printf('%.09f', microtime(true) - $s); echo "\n"; $s = microtime(true); for ($i = 0; $i < 1000; $i++) echo str_replace('/', '_', 'React/Controller/Website/User') . "\n"; printf('%.09f', microtime(true) - $s);
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 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 31
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 31
Branch analysis from position: 41
Branch analysis from position: 31
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/hK1Pn
function name:  (null)
number of ops:  50
compiled vars:  !0 = $s, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    4     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->14
    5     6    >   INIT_FCALL                                               'strtr'
          7        SEND_VAL                                                 'React%2FController%2FWebsite%2FUser'
          8        SEND_VAL                                                 '%2F'
          9        SEND_VAL                                                 '_'
         10        DO_ICALL                                         $5      
         11        CONCAT                                           ~6      $5, '%0A'
         12        ECHO                                                     ~6
    4    13        PRE_INC                                                  !1
         14    >   IS_SMALLER                                               !1, 1000
         15      > JMPNZ                                                    ~8, ->6
    6    16    >   INIT_FCALL                                               'printf'
         17        SEND_VAL                                                 '%25.09f'
         18        INIT_FCALL                                               'microtime'
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                         $9      
         21        SUB                                              ~10     $9, !0
         22        SEND_VAL                                                 ~10
         23        DO_ICALL                                                 
    8    24        ECHO                                                     '%0A'
   10    25        INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $12     
         28        ASSIGN                                                   !0, $12
   11    29        ASSIGN                                                   !1, 0
         30      > JMP                                                      ->39
   12    31    >   INIT_FCALL                                               'str_replace'
         32        SEND_VAL                                                 '%2F'
         33        SEND_VAL                                                 '_'
         34        SEND_VAL                                                 'React%2FController%2FWebsite%2FUser'
         35        DO_ICALL                                         $15     
         36        CONCAT                                           ~16     $15, '%0A'
         37        ECHO                                                     ~16
   11    38        PRE_INC                                                  !1
         39    >   IS_SMALLER                                               !1, 1000
         40      > JMPNZ                                                    ~18, ->31
   13    41    >   INIT_FCALL                                               'printf'
         42        SEND_VAL                                                 '%25.09f'
         43        INIT_FCALL                                               'microtime'
         44        SEND_VAL                                                 <true>
         45        DO_ICALL                                         $19     
         46        SUB                                              ~20     $19, !0
         47        SEND_VAL                                                 ~20
         48        DO_ICALL                                                 
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.42 ms | 1400 KiB | 21 Q