3v4l.org

run code in 500+ PHP versions simultaneously
<?php //$host = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'; $host = 'unix://unixhost'; $start = microtime(true); for ($i=0; $i<=1000; $i++) { substr($host, 0, strlen('unix://')) !== 'unix://'; } echo (microtime(true) - $start) . PHP_EOL; $start = microtime(true); for ($i=0; $i<=1000; $i++) { strpos($host, 'unix://') !== 0; } echo (microtime(true) - $start) . PHP_EOL; $start = microtime(true); for ($i=0; $i<=1000; $i++) { preg_match('~^unix://~', $host); } echo (microtime(true) - $start) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 26
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 44
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 44
Branch analysis from position: 49
Branch analysis from position: 44
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 26
Branch analysis from position: 32
Branch analysis from position: 26
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/rv7pl
function name:  (null)
number of ops:  56
compiled vars:  !0 = $host, !1 = $start, !2 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, 'unix%3A%2F%2Funixhost'
    6     1        INIT_FCALL                                                   'microtime'
          2        SEND_VAL                                                     <true>
          3        DO_ICALL                                             $4      
          4        ASSIGN                                                       !1, $4
    8     5        ASSIGN                                                       !2, 0
          6      > JMP                                                          ->12
    9     7    >   FRAMELESS_ICALL_3                substr              ~7      !0, 0
          8        OP_DATA                                                      7
          9        IS_NOT_IDENTICAL                                     ~8      ~7, 'unix%3A%2F%2F'
         10        FREE                                                         ~8
    8    11        PRE_INC                                                      !2
         12    >   IS_SMALLER_OR_EQUAL                                          !2, 1000
         13      > JMPNZ                                                        ~10, ->7
   11    14    >   INIT_FCALL                                                   'microtime'
         15        SEND_VAL                                                     <true>
         16        DO_ICALL                                             $11     
         17        SUB                                                  ~12     $11, !1
         18        CONCAT                                               ~13     ~12, '%0A'
         19        ECHO                                                         ~13
   14    20        INIT_FCALL                                                   'microtime'
         21        SEND_VAL                                                     <true>
         22        DO_ICALL                                             $14     
         23        ASSIGN                                                       !1, $14
   16    24        ASSIGN                                                       !2, 0
         25      > JMP                                                          ->30
   17    26    >   FRAMELESS_ICALL_2                strpos              ~17     !0, 'unix%3A%2F%2F'
         27        IS_NOT_IDENTICAL                                     ~18     ~17, 0
         28        FREE                                                         ~18
   16    29        PRE_INC                                                      !2
         30    >   IS_SMALLER_OR_EQUAL                                          !2, 1000
         31      > JMPNZ                                                        ~20, ->26
   19    32    >   INIT_FCALL                                                   'microtime'
         33        SEND_VAL                                                     <true>
         34        DO_ICALL                                             $21     
         35        SUB                                                  ~22     $21, !1
         36        CONCAT                                               ~23     ~22, '%0A'
         37        ECHO                                                         ~23
   22    38        INIT_FCALL                                                   'microtime'
         39        SEND_VAL                                                     <true>
         40        DO_ICALL                                             $24     
         41        ASSIGN                                                       !1, $24
   24    42        ASSIGN                                                       !2, 0
         43      > JMP                                                          ->47
   25    44    >   FRAMELESS_ICALL_2                preg_match          ~27     '%7E%5Eunix%3A%2F%2F%7E', !0
         45        FREE                                                         ~27
   24    46        PRE_INC                                                      !2
         47    >   IS_SMALLER_OR_EQUAL                                          !2, 1000
         48      > JMPNZ                                                        ~29, ->44
   27    49    >   INIT_FCALL                                                   'microtime'
         50        SEND_VAL                                                     <true>
         51        DO_ICALL                                             $30     
         52        SUB                                                  ~31     $30, !1
         53        CONCAT                                               ~32     ~31, '%0A'
         54        ECHO                                                         ~32
   28    55      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
151.35 ms | 489 KiB | 9 Q